11 lines
280 B
Ruby
11 lines
280 B
Ruby
class ExpireRemoteStorageAuthorizationJob < ApplicationJob
|
|
queue_as :remote_storage
|
|
|
|
def perform(rs_auth_id)
|
|
rs_auth = RemoteStorageAuthorization.find rs_auth_id
|
|
return unless rs_auth.expire_at.nil? || rs_auth.expire_at <= DateTime.now
|
|
|
|
rs_auth.destroy!
|
|
end
|
|
end
|