Feature #16922

cronjob to clear old tasks

Added by Ivan Necas 11 months ago. Updated 37 minutes ago.

Status:Closed
Priority:High
Assigned To:Martin Bacovsky
Category:-
Target version:Foreman - Team Ivan Iteration 13
Difficulty: Bugzilla link:1425471
Found in release: Pull request:https://github.com/theforeman/foreman-tasks/pull/278
Story points-
Velocity based estimate-

Description

A job that will clear old tasks. This works well and helps significantly with issues like slow dashboard loading due to repo sync lookup times, but users need to remember to run the cleanup periodically.

Ideally, if the job was run via cron (similar to orphan task cleanup), users would not hit as many issues related to large numbers of old tasks.


Related issues

Related to Foreman - Bug #17495: Align foreman configuration report expiry with Task expiry Closed 11/27/2016
Related to Installer - Bug #20819: Allow enabling foreman tasks task cleanup from the installer Ready For Testing 08/31/2017
Blocked by foreman-tasks - Feature #20352: Backup foreman tasks when they are deleted Ready For Testing 07/19/2017

Associated revisions

Revision 9d5fe72b
Added by Martin Bacovsky 2 days ago

Fixes #16922 - Clean old tasks automaticaly

Setup to cleanup tasks older then 30 days.
While the config is in foreman-tasks.yaml it is reflected by
'foreman_tasks:cleanup:config' rake task.
The time was set to 7:45 pm so it happens before nightly syncs
and do not collide with other default tasks of Foreman

Revision 488ea254
Added by Adam Růžička 39 minutes ago

Fixes #16922 - Clean old tasks automaticaly

History

#1 Updated by Ivan Necas 11 months ago

  • Subject changed from cronjob to clear old tasks to cronjob to clear old tasks
  • Target version set to Team Ivan backlog

#2 Updated by Ohad Levy 10 months ago

  • Priority changed from Normal to High

knowing the amount of pain we had in puppet with expiring reports, I would raise this priory to high now that foreman core uses tasks to import reports.

#3 Updated by Ohad Levy 10 months ago

  • Related to Bug #17495: Align foreman configuration report expiry with Task expiry added

#4 Updated by Pat Riehecky 9 months ago

It would be nice if there was a way to set the length of time to keep the entries in the UI, rather than hard coded in the cronjob

#5 Updated by Ivan Necas 7 months ago

  • Bugzilla link changed from 1384548 to 1425471

#6 Updated by Ivan Necas 7 months ago

  • Target version changed from Team Ivan backlog to Team Ivan Iteration 11

#7 Updated by Ivan Necas 6 months ago

  • Target version changed from Team Ivan Iteration 11 to Team Ivan Iteration 12

#8 Updated by Martin Bacovsky 6 months ago

  • Assigned To set to Martin Bacovsky

#9 Updated by Ivan Necas 6 months ago

  • Target version changed from Team Ivan Iteration 12 to Team Ivan Iteration 13

#10 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-tasks/pull/247 added

#11 Updated by Ivan Necas about 1 month ago

  • Blocked by Feature #20352: Backup foreman tasks when they are deleted added

#12 Updated by The Foreman Bot 23 days ago

  • Pull request https://github.com/theforeman/foreman-tasks/pull/278 added

#13 Updated by Adam Ruzicka 21 days ago

  • Related to Bug #20819: Allow enabling foreman tasks task cleanup from the installer added

#14 Updated by Martin Bacovsky 2 days ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#15 Updated by Ivan Necas 2 days ago

  • Status changed from Closed to Ready For Testing
  • Pull request deleted (https://github.com/theforeman/foreman-tasks/pull/247)

#16 Updated by Anonymous 37 minutes ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF