Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that the last kadi dwell < 3 days old #48

Merged
merged 2 commits into from
Jun 25, 2021
Merged

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Jun 14, 2021

Check that the last kadi dwell < 3 days old

For testing, I ran this as jobwatch.skawatch.main() and reviewed the output HTML. It seems reasonable:

Screen Shot 2021-06-25 at 10 59 11 AM

Independent inspection of kadi dwells shows the last stop time about 0.62 days from "now". I didn't confirm the time in local but seems reasonable.

When I ran this code two weeks ago when kadi was stuck, I saw the "red" that I expected in the report (code has changed a bit since then, but same idea).

dwells = events.dwells.filter(-20)
last_dwell = dwells[len(dwells) - 1]
self.filetime = CxoTime(last_dwell.start).unix
self.filedate = time.ctime(self.filetime)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is clunky but I didn't see a driver to update the formatting of the rest of the time strings.

@jeanconn jeanconn requested a review from taldcroft June 21, 2021 13:52
jobwatch/skawatch.py Outdated Show resolved Hide resolved
jobwatch/skawatch.py Outdated Show resolved Hide resolved
jobwatch/skawatch.py Outdated Show resolved Hide resolved
jobwatch/skawatch.py Outdated Show resolved Hide resolved
Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks good now.

@taldcroft
Copy link
Member

Actually I don't see any description of testing, so not quite approved.

@taldcroft taldcroft self-requested a review June 24, 2021 22:14
@jeanconn
Copy link
Contributor Author

Oops. Updated text with testing.

@taldcroft taldcroft merged commit 155c7f7 into master Jun 25, 2021
@taldcroft taldcroft deleted the kadi_dwells branch June 25, 2021 15:07
@javierggt javierggt mentioned this pull request Oct 26, 2021
@javierggt javierggt mentioned this pull request Aug 3, 2022
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