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

Update update_monitor_table() to use django models #1659

Conversation

bhilbert4
Copy link
Collaborator

Update the update_monitor_table function, which is called by most (all?) monitors and records the date and success or failure of a monitor run, to use Django models.

This PR involves an update to the definition of the status column in the table, and therefore will need a migration attached to it.

Resolves #1485

@bhilbert4 bhilbert4 self-assigned this Dec 2, 2024
@pep8speaks
Copy link

pep8speaks commented Dec 2, 2024

Hello @bhilbert4, Thank you for updating !

Line 188:1: E305 expected 2 blank lines after class or function definition, found 1
Line 188:1: E402 module level import not at top of file

Comment last updated at 2025-01-28 02:38:00 UTC

@bhilbert4
Copy link
Collaborator Author

bhilbert4 commented Jan 28, 2025

Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

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

This looks good, do we need to add a migration for update_monitor_table?

@mfixstsci
Copy link
Collaborator

I see, this answers my question 😆

@mfixstsci
Copy link
Collaborator

@bhilbert4 #1666 is in, waiting on the rebase and then we can merge this too 💯

@bhilbert4
Copy link
Collaborator Author

I still need to create the migration file for this one...

@mfixstsci
Copy link
Collaborator

I still need to create the migration file for this one...

Of course, I am having PR merging tunnel vision 😵‍💫

@bhilbert4
Copy link
Collaborator Author

I just ran the wisp monitor (locally) using the updated code in this PR, and I can see the new entry in the Monitor database table. All looks good. I got a warning about datetime objects with no timezone, but I think that's something to be fixed in the wisp monitor in a separate PR. I think this PR is good to go.

@mfixstsci
Copy link
Collaborator

I just ran the wisp monitor (locally) using the updated code in this PR, and I can see the new entry in the Monitor database table. All looks good. I got a warning about datetime objects with no timezone, but I think that's something to be fixed in the wisp monitor in a separate PR. I think this PR is good to go.

Nice, that is typical something to do with a datetime field entry from my experience.

@mfixstsci mfixstsci merged commit c72a7d3 into spacetelescope:develop Feb 5, 2025
11 checks passed
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.

Update monitor_utils to use django models
3 participants