Skip to content

update how HK database delays are processed#1644

Open
kmharrington wants to merge 3 commits into
masterfrom
update-delay-fix
Open

update how HK database delays are processed#1644
kmharrington wants to merge 3 commits into
masterfrom
update-delay-fix

Conversation

@kmharrington
Copy link
Copy Markdown
Member

We had a hardcoded 1 hour delay as the acceptable limit for HK database updates compared to when imprinter was searching for new books. This is getting broken with the new HK suprsyncs.

This fixes that and moves the logic for where the error message gets thrown. We'll match the warning / error timeouts to what is used for incomplete observations.

@kmharrington kmharrington requested review from JBorrow and mhasself May 24, 2026 15:35
Copy link
Copy Markdown
Member

@JBorrow JBorrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor clarity patches but looks good

Comment thread sotodlib/io/imprinter.py
)
## this will catch suprsync drops and hk/g3tsmurf databases not being updated
if final_time < max_ctime:
if max_ctime - final_time > 3600*incomplete_timeouts[1]:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity:

Suggested change
if max_ctime - final_time > 3600*incomplete_timeouts[1]:
if (max_ctime - final_time) > (3600 * incomplete_timeouts[1]):

Comment thread sotodlib/io/imprinter.py
f"G3tSMURF + HK databases are stale. Last updates were "
f"more than {incomplete_timeouts[1]} hours in the past."
)
if max_ctime - final_time > 3600*incomplete_timeouts[0]:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if max_ctime - final_time > 3600*incomplete_timeouts[0]:
if (max_ctime - final_time) > (3600 * incomplete_timeouts[0]):

Comment thread sotodlib/io/load_smurf.py
HK = self.get_HK()
last_update = HK.get_last_update()
if stop > last_update:
if stop > last_update + 2*3600:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if stop > last_update + 2*3600:
if stop > (last_update + 2 * 3600):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants