mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
7c57d74e85
(checks every 30 minutes for complete failure)
16 lines
287 B
Ruby
16 lines
287 B
Ruby
module Jobs
|
|
class RunHeartbeat < Jobs::Base
|
|
|
|
def self.heartbeat_key
|
|
'heartbeat_last_run'
|
|
end
|
|
|
|
def execute(args)
|
|
$redis.set(self.class.heartbeat_key, Time.new.to_i.to_s)
|
|
end
|
|
|
|
def self.last_heartbeat
|
|
$redis.get(heartbeat_key).to_i
|
|
end
|
|
end
|
|
end
|