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

Add rotate_hindcast_logs worker #105

Merged
merged 3 commits into from
Jun 6, 2022
Merged

Add rotate_hindcast_logs worker #105

merged 3 commits into from
Jun 6, 2022

Conversation

douglatornell
Copy link
Member

Call the doRollover() method on the RotatingFileHandler handlers of the run_NEMO_hindcast
logger.

This worker is intended to be launched from the command-line
by a nowcast administrator as necessary for maintenance of the hindcast log files
e.g. when a new hindcast is started, or when the logs from a running hindcast become annoying long.

@douglatornell douglatornell self-assigned this Jun 2, 2022
@douglatornell douglatornell added enhancement New feature or request Workers labels Jun 2, 2022
@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #105 (dbf94de) into main (2ed245c) will increase coverage by 0.17%.
The diff coverage is 98.23%.

@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
+ Coverage   73.20%   73.37%   +0.17%     
==========================================
  Files         124      126       +2     
  Lines       16234    16347     +113     
  Branches     1319     1328       +9     
==========================================
+ Hits        11884    11995     +111     
- Misses       4299     4300       +1     
- Partials       51       52       +1     
Flag Coverage Δ
unittests 73.37% <98.23%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nowcast/next_workers.py 98.36% <50.00%> (-0.27%) ⬇️
nowcast/workers/rotate_hindcast_logs.py 97.14% <97.14%> (ø)
tests/test_next_workers.py 99.71% <100.00%> (+<0.01%) ⬆️
tests/workers/test_rotate_hindcast_logs.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ed245c...dbf94de. Read the comment docs.

@douglatornell
Copy link
Member Author

Test in production was semi-successful:

  • hindcast log files were successfully rotated
  • "unregistered worker error" was raised because I forgot to restart manager
  • realized that I did not write a next_workers.after_rotate_hindcast_logs() function

@douglatornell douglatornell merged commit 5b8c8de into main Jun 6, 2022
@douglatornell douglatornell deleted the rotate_hindcast_logs branch June 6, 2022 20:15
@douglatornell douglatornell added this to the v22.1 milestone Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Workers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant