Reschedule pending RecalculateVulnerabilitiesOccurrencesUuid jobs
requested to merge 341195-reschedule-pending-recalculatevulnerabilitiesoccurrencesuuid-jobs into master
What does this MR do and why?
- Drops old (older than migrations scheduled on 2021-08-18) pending jobs from
background_migration_jobs
table - Reschedules pending jobs for RecalculateVulnerabilitiesOccurrencesUuid ran on 2021-08-18
Related to #341195 (closed)
Database review
Remove old, pending records
DELETE FROM background_migration_jobs WHERE class_name = 'RecalculateVulnerabilitiesOccurrencesUuid' AND status = 0 AND created_at <= '2021-08-18';
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/6565/commands/22841
$ bundle exec rails db:migrate
== 20210918201050 RemoveOldPendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: migrating
== 20210918201050 RemoveOldPendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: migrated (0.0064s)
$ bundle exec rails db:rollback
== 20210918201050 RemoveOldPendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: reverting
== 20210918201050 RemoveOldPendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: reverted (0.0000s)
Reschedule pending jobs
$ bundle exec rails db:migrate
== 20210918202855 ReschedulePendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: migrating
-- Scheduled 0 RecalculateVulnerabilitiesOccurrencesUuid jobs with an interval of 120 seconds.
The migration is expected to take at least 0 seconds. Expect all jobs to have completed after 2021-09-18 21:01:19 UTC.
== 20210918202855 ReschedulePendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: migrated (0.0114s)
$ bundle exec rails db:rollback
== 20210918202855 ReschedulePendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: reverting
== 20210918202855 ReschedulePendingJobsForRecalculateVulnerabilitiesOccurrencesUuid: reverted (0.0000s)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Michał Zając