Skip to content

Commit

Permalink
use inst-jobs periodic cleanup as proc
Browse files Browse the repository at this point in the history
refs FOO-1204
flag=none

TEST PLAN:
  1) run a bunch of workers with periodic jobs
  2) cleanups stop dead jobs from still existing
  3) cleanup JOBS don't exist anymore

Change-Id: I522ffa643d9f9375f6f04b5edccd011e41e74c85
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256168
Tested-by: Service Cloud Jenkins <[email protected]>
Reviewed-by: Simon Williams <[email protected]>
QA-Review: Simon Williams <[email protected]>
Product-Review: Simon Williams <[email protected]>
  • Loading branch information
evizitei committed Jan 7, 2021
1 parent dd5614f commit 6b1a46f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.d/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
gem 'statsd-ruby', '1.4.0', require: false
gem 'aroi', '0.0.7', require: false
gem 'dogstatsd-ruby', '4.8.2'
gem 'inst-jobs', '2.1.3'
gem 'inst-jobs', '2.2.0'
gem 'fugit', '1.4.0', require: false
gem 'et-orbi', '1.2.4', require: false
gem 'inst-jobs-autoscaling', '2.1.0'
Expand Down
4 changes: 0 additions & 4 deletions config/initializers/periodic_jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ def with_each_shard_by_database(klass, method, *args, jitter: nil, local_offset:
Canvas::Oauth::KeyStorage.rotate_keys
end

Delayed::Periodic.cron 'abandoned job cleanup', '*/10 * * * *' do
Delayed::Worker::HealthCheck.reschedule_abandoned_jobs
end

Delayed::Periodic.cron 'Purgatory.expire_old_purgatories', '0 0 * * *', priority: Delayed::LOWER_PRIORITY do
with_each_shard_by_database(Purgatory, :expire_old_purgatories, local_offset: true)
end
Expand Down

0 comments on commit 6b1a46f

Please sign in to comment.