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

Use default interval from pollfile to stagger new jobs #339

Conversation

johannaengland
Copy link
Contributor

@johannaengland johannaengland commented Aug 2, 2024

Scope and purpose

Fixes #337.

Changed the way that read_polldevs work to make it easier to return the PollDevices and the default values. I was considering splitting the function in two: One to read the defaults and one to read the rest - the poll devices, but decided for this method, since it is simpler changes.

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 Aug 2, 2024
@johannaengland johannaengland self-assigned this Aug 2, 2024
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.20%. Comparing base (70b1a57) to head (a3300ec).

Files Patch % Lines
src/zino/getuptime.py 66.67% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #339   +/-   ##
=======================================
  Coverage   98.20%   98.20%           
=======================================
  Files          64       64           
  Lines        7926     7930    +4     
=======================================
+ Hits         7783     7787    +4     
  Misses        143      143           

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

@johannaengland johannaengland force-pushed the bugfix/use-default-interval-pollfile-to-stagger-first-jobs branch from b1b386d to 72902a6 Compare August 2, 2024 11:59
src/zino/scheduler.py Outdated Show resolved Hide resolved
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.

Other than the point noted, this patch works as expected.

src/zino/scheduler.py Show resolved Hide resolved
This is in preparation of having it also return the defaults separately
And the result was always cast to a list or dict anyway
@johannaengland johannaengland force-pushed the bugfix/use-default-interval-pollfile-to-stagger-first-jobs branch from 784825b to d39c701 Compare August 8, 2024 15:39
@johannaengland johannaengland force-pushed the bugfix/use-default-interval-pollfile-to-stagger-first-jobs branch from d39c701 to a3300ec Compare August 8, 2024 15:43
Copy link

sonarcloud bot commented Aug 8, 2024

@johannaengland johannaengland merged commit 19ded46 into Uninett:master Aug 8, 2024
9 of 10 checks passed
@johannaengland johannaengland deleted the bugfix/use-default-interval-pollfile-to-stagger-first-jobs branch August 8, 2024 15:53
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.

Scheduling interval of new jobs fixed to 300sec.
3 participants