diff --git a/src/worker/jobs/archive_version_downloads.rs b/src/worker/jobs/archive_version_downloads.rs index 9d944e7c094..165a0f4e0d5 100644 --- a/src/worker/jobs/archive_version_downloads.rs +++ b/src/worker/jobs/archive_version_downloads.rs @@ -48,6 +48,7 @@ impl Default for ArchiveVersionDownloads { impl BackgroundJob for ArchiveVersionDownloads { const JOB_NAME: &'static str = "archive_version_downloads"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/daily_db_maintenance.rs b/src/worker/jobs/daily_db_maintenance.rs index ebcff4b265a..014a214d1ee 100644 --- a/src/worker/jobs/daily_db_maintenance.rs +++ b/src/worker/jobs/daily_db_maintenance.rs @@ -10,6 +10,7 @@ pub struct DailyDbMaintenance; impl BackgroundJob for DailyDbMaintenance { const JOB_NAME: &'static str = "daily_db_maintenance"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/delete_crate.rs b/src/worker/jobs/delete_crate.rs index cd0a06b366f..9ce4911bbf1 100644 --- a/src/worker/jobs/delete_crate.rs +++ b/src/worker/jobs/delete_crate.rs @@ -19,6 +19,7 @@ impl DeleteCrateFromStorage { impl BackgroundJob for DeleteCrateFromStorage { const JOB_NAME: &'static str = "delete_crate_from_storage"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/downloads/clean_processed_log_files.rs b/src/worker/jobs/downloads/clean_processed_log_files.rs index 2e02daee710..5b744401926 100644 --- a/src/worker/jobs/downloads/clean_processed_log_files.rs +++ b/src/worker/jobs/downloads/clean_processed_log_files.rs @@ -16,6 +16,7 @@ pub struct CleanProcessedLogFiles; impl BackgroundJob for CleanProcessedLogFiles { const JOB_NAME: &'static str = "clean_processed_log_files"; + const DEDUPLICATED: bool = true; const QUEUE: &'static str = "downloads"; type Context = Arc; diff --git a/src/worker/jobs/downloads/process_log.rs b/src/worker/jobs/downloads/process_log.rs index b5549adbdc8..07555e23912 100644 --- a/src/worker/jobs/downloads/process_log.rs +++ b/src/worker/jobs/downloads/process_log.rs @@ -44,6 +44,7 @@ impl ProcessCdnLog { impl BackgroundJob for ProcessCdnLog { const JOB_NAME: &'static str = "process_cdn_log"; + const DEDUPLICATED: bool = true; const QUEUE: &'static str = "downloads"; type Context = Arc; diff --git a/src/worker/jobs/downloads/update_metadata.rs b/src/worker/jobs/downloads/update_metadata.rs index ab4a29d0c5c..7f8233d0cb2 100644 --- a/src/worker/jobs/downloads/update_metadata.rs +++ b/src/worker/jobs/downloads/update_metadata.rs @@ -14,6 +14,7 @@ pub struct UpdateDownloads; impl BackgroundJob for UpdateDownloads { const JOB_NAME: &'static str = "update_downloads"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/dump_db.rs b/src/worker/jobs/dump_db.rs index 7878a27b12c..1b603e9704b 100644 --- a/src/worker/jobs/dump_db.rs +++ b/src/worker/jobs/dump_db.rs @@ -14,6 +14,7 @@ pub struct DumpDb; impl BackgroundJob for DumpDb { const JOB_NAME: &'static str = "dump_db"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/expiry_notification.rs b/src/worker/jobs/expiry_notification.rs index 4e9768efbef..d8188b1d796 100644 --- a/src/worker/jobs/expiry_notification.rs +++ b/src/worker/jobs/expiry_notification.rs @@ -21,6 +21,7 @@ pub struct SendTokenExpiryNotifications; impl BackgroundJob for SendTokenExpiryNotifications { const JOB_NAME: &'static str = "send_token_expiry_notifications"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/index/squash.rs b/src/worker/jobs/index/squash.rs index 6ed52e605b3..85ac0af8aa1 100644 --- a/src/worker/jobs/index/squash.rs +++ b/src/worker/jobs/index/squash.rs @@ -12,6 +12,7 @@ pub struct SquashIndex; impl BackgroundJob for SquashIndex { const JOB_NAME: &'static str = "squash_index"; + const DEDUPLICATED: bool = true; const QUEUE: &'static str = "repository"; type Context = Arc; diff --git a/src/worker/jobs/index/sync.rs b/src/worker/jobs/index/sync.rs index ff7c62907a6..5a38044b0a8 100644 --- a/src/worker/jobs/index/sync.rs +++ b/src/worker/jobs/index/sync.rs @@ -28,6 +28,7 @@ impl SyncToGitIndex { impl BackgroundJob for SyncToGitIndex { const JOB_NAME: &'static str = "sync_to_git_index"; const PRIORITY: i16 = 100; + const DEDUPLICATED: bool = true; const QUEUE: &'static str = "repository"; type Context = Arc; @@ -94,6 +95,7 @@ impl SyncToSparseIndex { impl BackgroundJob for SyncToSparseIndex { const JOB_NAME: &'static str = "sync_to_sparse_index"; const PRIORITY: i16 = 100; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/index_version_downloads_archive/mod.rs b/src/worker/jobs/index_version_downloads_archive/mod.rs index 8a05481c420..1a1d16965da 100644 --- a/src/worker/jobs/index_version_downloads_archive/mod.rs +++ b/src/worker/jobs/index_version_downloads_archive/mod.rs @@ -16,6 +16,7 @@ pub struct IndexVersionDownloadsArchive; impl BackgroundJob for IndexVersionDownloadsArchive { const JOB_NAME: &'static str = "index_version_downloads_archive"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/rss/sync_crate_feed.rs b/src/worker/jobs/rss/sync_crate_feed.rs index 97f63ae7eeb..931d677a509 100644 --- a/src/worker/jobs/rss/sync_crate_feed.rs +++ b/src/worker/jobs/rss/sync_crate_feed.rs @@ -33,6 +33,7 @@ impl SyncCrateFeed { impl BackgroundJob for SyncCrateFeed { const JOB_NAME: &'static str = "sync_crate_feed"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/rss/sync_crates_feed.rs b/src/worker/jobs/rss/sync_crates_feed.rs index b755d87db64..deb9071cb0e 100644 --- a/src/worker/jobs/rss/sync_crates_feed.rs +++ b/src/worker/jobs/rss/sync_crates_feed.rs @@ -25,6 +25,7 @@ const NUM_ITEMS: i64 = 50; impl BackgroundJob for SyncCratesFeed { const JOB_NAME: &'static str = "sync_crates_feed"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/rss/sync_updates_feed.rs b/src/worker/jobs/rss/sync_updates_feed.rs index a75039e4a60..9d9cc71fcec 100644 --- a/src/worker/jobs/rss/sync_updates_feed.rs +++ b/src/worker/jobs/rss/sync_updates_feed.rs @@ -25,6 +25,7 @@ const NUM_ITEMS: i64 = 100; impl BackgroundJob for SyncUpdatesFeed { const JOB_NAME: &'static str = "sync_updates_feed"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/send_publish_notifications.rs b/src/worker/jobs/send_publish_notifications.rs index 4f87a940bea..55e6d95ffe1 100644 --- a/src/worker/jobs/send_publish_notifications.rs +++ b/src/worker/jobs/send_publish_notifications.rs @@ -25,6 +25,7 @@ impl SendPublishNotificationsJob { impl BackgroundJob for SendPublishNotificationsJob { const JOB_NAME: &'static str = "send_publish_notifications"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/sync_admins.rs b/src/worker/jobs/sync_admins.rs index 63fddccfa34..4f7ec8a1ba0 100644 --- a/src/worker/jobs/sync_admins.rs +++ b/src/worker/jobs/sync_admins.rs @@ -18,6 +18,7 @@ pub struct SyncAdmins; impl BackgroundJob for SyncAdmins { const JOB_NAME: &'static str = "sync_admins"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/typosquat.rs b/src/worker/jobs/typosquat.rs index 05e81934991..02b1d4722f6 100644 --- a/src/worker/jobs/typosquat.rs +++ b/src/worker/jobs/typosquat.rs @@ -28,6 +28,7 @@ impl CheckTyposquat { impl BackgroundJob for CheckTyposquat { const JOB_NAME: &'static str = "check_typosquat"; + const DEDUPLICATED: bool = true; type Context = Arc; diff --git a/src/worker/jobs/update_default_version.rs b/src/worker/jobs/update_default_version.rs index c597c5a4873..5dbb5c32f9b 100644 --- a/src/worker/jobs/update_default_version.rs +++ b/src/worker/jobs/update_default_version.rs @@ -19,6 +19,7 @@ impl UpdateDefaultVersion { impl BackgroundJob for UpdateDefaultVersion { const JOB_NAME: &'static str = "update_default_version"; const PRIORITY: i16 = 80; + const DEDUPLICATED: bool = true; type Context = Arc;