11 lines
279 B
Ruby
11 lines
279 B
Ruby
class RemoteStorageExpireAuthorizationJob < ApplicationJob
|
|
queue_as :remotestorage
|
|
|
|
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
|