Skip to content

Commit

Permalink
Updated sidekiq unique job option to “until_executed”
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Mar 27, 2016
1 parent 9e39037 commit 7185896
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/workers/check_repo_status_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CheckRepoStatusWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(repo_full_name, removed = false)
response = Typhoeus.head("https://github.com/#{repo_full_name}")
Expand Down
2 changes: 1 addition & 1 deletion app/workers/check_status_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CheckStatusWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(project_id, platform, project_name, removed = false)
case platform.downcase
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_create_org_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubCreateOrgWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(org_login)
GithubOrganisation.create_from_github(org_login)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_create_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubCreateWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(repo_name, token = nil)
token = token || AuthToken.token
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_download_fork_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubDownloadForkWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(repo_id, token = nil)
token = token || AuthToken.token
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_download_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubDownloadWorker
include Sidekiq::Worker
sidekiq_options unique: true
sidekiq_options unique: :until_executed

def perform(repo_id, token = nil)
token = token || AuthToken.token
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_hook_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubHookWorker
include Sidekiq::Worker
sidekiq_options queue: :critical, unique: true
sidekiq_options queue: :critical, unique: :until_executed

def perform(github_id, sender_id)
github_repository = GithubRepository.find_by_github_id(github_id)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_project_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubProjectWorker
include Sidekiq::Worker
sidekiq_options unique: true
sidekiq_options unique: :until_executed

def perform(project_id)
project = Project.find_by_id(project_id)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_star_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubStarWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(repo_name, token = nil)
token = token || AuthToken.token
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_tag_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubTagWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(repo_name, token = nil)
token = token || AuthToken.token
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_update_org_worker.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class GithubUpdateOrgWorker
include Sidekiq::Worker
sidekiq_options queue: :low
sidekiq_options unique: true
sidekiq_options unique: :until_executed

def perform(login)
org = GithubOrganisation.find_by_login(login)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_update_user_worker.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class GithubUpdateUserWorker
include Sidekiq::Worker
sidekiq_options queue: :low
sidekiq_options unique: true
sidekiq_options unique: :until_executed

def perform(login)
user = GithubUser.find_by_login(login)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/github_update_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GithubUpdateWorker
include Sidekiq::Worker
sidekiq_options queue: :low, unique: true
sidekiq_options queue: :low, unique: :until_executed

def perform(repo_name, token = nil)
token = token || AuthToken.token
Expand Down
2 changes: 1 addition & 1 deletion app/workers/repository_download_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class RepositoryDownloadWorker
include Sidekiq::Worker
sidekiq_options queue: :critical, unique: true
sidekiq_options queue: :critical, unique: :until_executed

def perform(class_name, name)
klass = "Repositories::#{class_name}".constantize
Expand Down
2 changes: 1 addition & 1 deletion app/workers/sync_permissions_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class SyncPermissionsWorker
include Sidekiq::Worker
sidekiq_options queue: :user, unique: true
sidekiq_options queue: :user, unique: :until_executed

def perform(user_id)
user = User.find_by_id(user_id)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/tag_notifications_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class TagNotificationsWorker
include Sidekiq::Worker
sidekiq_options queue: :critical, unique: true
sidekiq_options queue: :critical, unique: :until_executed

def perform(tag_id)
GithubTag.find_by_id(tag_id).try(:send_notifications)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/update_source_rank_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UpdateSourceRankWorker
include Sidekiq::Worker
sidekiq_options :queue => :low, unique: true
sidekiq_options :queue => :low, unique: :until_executed

def perform(project_id)
project = Project.find_by_id(project_id)
Expand Down
2 changes: 1 addition & 1 deletion app/workers/version_notifications_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class VersionNotificationsWorker
include Sidekiq::Worker
sidekiq_options queue: :critical, unique: true
sidekiq_options queue: :critical, unique: :until_executed

def perform(version_id)
Version.find_by_id(version_id).try(:send_notifications)
Expand Down

0 comments on commit 7185896

Please sign in to comment.