diff --git a/app/jobs/expire_remote_storage_authorization_job.rb b/app/jobs/remote_storage_expire_authorization_job.rb similarity index 69% rename from app/jobs/expire_remote_storage_authorization_job.rb rename to app/jobs/remote_storage_expire_authorization_job.rb index 8007e2c..62c240c 100644 --- a/app/jobs/expire_remote_storage_authorization_job.rb +++ b/app/jobs/remote_storage_expire_authorization_job.rb @@ -1,5 +1,5 @@ -class ExpireRemoteStorageAuthorizationJob < ApplicationJob - queue_as :remote_storage +class RemoteStorageExpireAuthorizationJob < ApplicationJob + queue_as :remotestorage def perform(rs_auth_id) rs_auth = RemoteStorageAuthorization.find rs_auth_id diff --git a/app/models/remote_storage_authorization.rb b/app/models/remote_storage_authorization.rb index 15f677e..82ac744 100644 --- a/app/models/remote_storage_authorization.rb +++ b/app/models/remote_storage_authorization.rb @@ -53,11 +53,11 @@ class RemoteStorageAuthorization < ApplicationRecord .perform_later(id) end - def remove_token_expiry_job - queue = Sidekiq::Queue.new(ExpireRemoteStorageAuthorizationJob.queue_name) - queue.each do |job| - next unless job.display_class == "ExpireRemoteStorageAuthorizationJob" - job.delete if job.display_args == [id] + def remove_token_expiry_job + queue = Sidekiq::Queue.new(RemoteStorageExpireAuthorizationJob.queue_name) + queue.each do |job| + next unless job.display_class == "RemoteStorageExpireAuthorizationJob" + job.delete if job.display_args == [id] + end end - end end