Rename RS token expiry job
This commit is contained in:
parent
e11be727a1
commit
645abac810
@ -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
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user