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

Reschedule changed devices #333

Conversation

johannaengland
Copy link
Contributor

Scope and purpose

Fixes #330.

Makes load_polldevs detect changed devices and then deletes scheduled jobs for these and adds new jobs with the new configuration values.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with black, ruff and isort, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

@johannaengland johannaengland added the bug Something isn't working label Jul 31, 2024
@johannaengland johannaengland self-assigned this Jul 31, 2024
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.20%. Comparing base (41a87dc) to head (0164d26).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #333   +/-   ##
=======================================
  Coverage   98.19%   98.20%           
=======================================
  Files          64       64           
  Lines        7922     7926    +4     
=======================================
+ Hits         7779     7783    +4     
  Misses        143      143           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@runborg runborg left a comment

Choose a reason for hiding this comment

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

Technically this does fix the issue with rescheduling devices and works as intended. so that is a +1 from me.
As for the question about the information logged someone else needs to take a decision on that part

This will be used to reschedule their jobs to be correctly according to changes
This is simply done by deleting the current jobs and adding new ones
@johannaengland johannaengland requested a review from stveit August 2, 2024 10:50
Copy link

sonarqubecloud bot commented Aug 2, 2024

@johannaengland johannaengland merged commit d33ecf6 into Uninett:master Aug 2, 2024
10 checks passed
@johannaengland johannaengland deleted the bugfix/reschedule-changed-devices branch August 2, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating default interval in polldevs does not re-schedule tasks
3 participants