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 cronjob that clears old tasks every midnight #3066

Merged

Conversation

aronasorman
Copy link
Collaborator

Summary

Description of the change(s) you made

Create a cronjob that spawns a pod that clears tasks older than 7 days.

Manual verification steps performed

  1. Create cronjob on my local machine that connects to develop
  2. Run that cronjob manually
  3. Check that there are no jobs older than 7 days

Reviewer's Checklist

This section is for reviewers to fill out.

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #3066 (6f66823) into unstable (9264221) will decrease coverage by 0.18%.
The diff coverage is n/a.

❗ Current head 6f66823 differs from pull request most recent head 7acb364. Consider uploading reports for the commit 7acb364 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##           unstable    #3066      +/-   ##
============================================
- Coverage     86.12%   85.93%   -0.19%     
============================================
  Files           305      304       -1     
  Lines         16459    16403      -56     
============================================
- Hits          14175    14096      -79     
- Misses         2284     2307      +23     
Impacted Files Coverage Δ
...tentcuration/contentcuration/utils/celery/tasks.py 76.27% <0.00%> (-5.99%) ⬇️
contentcuration/contentcuration/tasks.py 57.62% <0.00%> (-3.96%) ⬇️
contentcuration/contentcuration/tasks_test.py 83.33% <0.00%> (-2.04%) ⬇️
contentcuration/contentcuration/models.py 84.58% <0.00%> (-1.98%) ⬇️
...ion/contentcuration/tests/viewsets/test_channel.py 92.91% <0.00%> (-1.27%) ⬇️
...ntcuration/contentcuration/tests/test_asynctask.py 91.42% <0.00%> (-1.08%) ⬇️
contentcuration/contentcuration/views/base.py 62.82% <0.00%> (-0.62%) ⬇️
...ontentcuration/contentcuration/viewsets/channel.py 79.74% <0.00%> (-0.43%) ⬇️
contentcuration/contentcuration/views/internal.py 85.37% <0.00%> (-0.23%) ⬇️
...contentcuration/tests/views/test_views_internal.py 97.24% <0.00%> (-0.21%) ⬇️
... and 12 more

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 d302bcd...7acb364. Read the comment docs.

@rtibbles rtibbles force-pushed the clear-old-tasks-cronjob branch from 6f66823 to 73d5532 Compare August 4, 2021 23:33
@rtibbles rtibbles changed the base branch from hotfixes to unstable August 4, 2021 23:34
@rtibbles rtibbles force-pushed the clear-old-tasks-cronjob branch from 9a327cb to 90e32e7 Compare August 5, 2021 02:33
@aronasorman
Copy link
Collaborator Author

The kubernetes part looks good to me!

Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

This appears to introduce a regression. After publishing, the PUBLISH button is enabled.

rtibbles and others added 2 commits August 5, 2021 15:04
Co-authored-by: Richard Tibbles <richard@learningequality.org>
@rtibbles rtibbles force-pushed the clear-old-tasks-cronjob branch from edaf3b4 to 7acb364 Compare August 5, 2021 22:04
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

Publishing issue appears resolved by #3256

@bjester bjester merged commit 8c4cf8e into learningequality:unstable Aug 5, 2021
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.

3 participants