Rename RS token expiry job

This commit is contained in:
Râu Cao 2023-07-14 15:29:29 +02:00
parent e11be727a1
commit 645abac810
2 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
class ExpireRemoteStorageAuthorizationJob < ApplicationJob class RemoteStorageExpireAuthorizationJob < ApplicationJob
queue_as :remote_storage queue_as :remotestorage
def perform(rs_auth_id) def perform(rs_auth_id)
rs_auth = RemoteStorageAuthorization.find rs_auth_id rs_auth = RemoteStorageAuthorization.find rs_auth_id

View File

@ -53,11 +53,11 @@ class RemoteStorageAuthorization < ApplicationRecord
.perform_later(id) .perform_later(id)
end end
def remove_token_expiry_job def remove_token_expiry_job
queue = Sidekiq::Queue.new(ExpireRemoteStorageAuthorizationJob.queue_name) queue = Sidekiq::Queue.new(RemoteStorageExpireAuthorizationJob.queue_name)
queue.each do |job| queue.each do |job|
next unless job.display_class == "ExpireRemoteStorageAuthorizationJob" next unless job.display_class == "RemoteStorageExpireAuthorizationJob"
job.delete if job.display_args == [id] job.delete if job.display_args == [id]
end
end end
end
end end