mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 15:03:38 +08:00
FIX: race condition
This commit is contained in:
parent
35ea1274e2
commit
070cdbe64b
|
@ -34,7 +34,7 @@ module BackupRestore
|
|||
|
||||
def self.mark_as_running!
|
||||
# TODO: for extra safety, it should acquire a lock and raise an exception if already running
|
||||
$redis.set(running_key, "1")
|
||||
$redis.setex(running_key, 60, "1")
|
||||
save_start_logs_message_id
|
||||
keep_it_running
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user