[INSTRM-1291] Create visit_set and sps_sequence rows as soon as practical. Created: 17/Jun/21  Updated: 26/Jun/21  Resolved: 26/Jun/21

Status: Done
Project: Instrument control development
Component/s: ics_iicActor, ics_spsActor
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: cloomis Assignee: arnaud.lefur
Resolution: Done Votes: 0
Labels: SPS
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by INSTRM-1293 pull out status column from sps_seque... Done
Sprint: SM1PD-2021 A 12

 Description   

The obslog and other consumers need to be able to see active sequences as soon as they have been started, and to see which command/visit_set_id each SPS visit is associated with.

sps_sequence.status might need to be handled differently.



 Comments   
Comment by arnaud.lefur [ 24/Jun/21 ]

We need to think a bit to the insert temporality here.
sps_visit and mcs_exposure are inserted when the fits file is actually created which make sense.
For sps_sequence(iic_sequence), visit_set have two options regarding the insert timing:

  • before the exposure and after gen2 returns getVisit, earliest option. in that case some of the existing constraints would need to be relieved because right now visit_set cannot be inserted before sps_visit, note that INSTRM-1305 raises a similar problem.
  • after the exposure, works with the current schema, but it wouldn't be ideal in the obslog purpose.
Comment by arnaud.lefur [ 25/Jun/21 ]

dragging Kiyoto Yabe here, because INSTRM-1293 might not be sufficient.

Comment by cloomis [ 25/Jun/21 ]

I think the constraints might be fine. The sps_sequence creates the new visit_set_id and provides all the command/sequence info, right? So create that before taking any exposures. Each sps exposure will then get a new pfs_visit_id from gen2: when the exposure is done insert the (visit_set_id, pfs_visit_id) row in visit_set. No?

Actually, if I'm reading models.py right, the primary key on visit_set should be sps_sequence.visit_se_id instead of sps_visit.pfs_visit_id.

Comment by arnaud.lefur [ 25/Jun/21 ]

right. In anycase, the join will only be possible when the exposure is finished, but looking at the obslog it might be okay.

Comment by arnaud.lefur [ 26/Jun/21 ]

merged to master

Generated at Sat Feb 10 16:33:51 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.