AI: address issue #483
このコミットが含まれているのは:
@@ -108,9 +108,12 @@ class StaticMirrorJob < ApplicationJob
|
||||
synchronise(blocking: true) do
|
||||
value = state
|
||||
return unless value && value['id'] == id
|
||||
# Expiry is terminal even when a delayed worker still owns the generation lock.
|
||||
return if value['status'] == 'failed'
|
||||
|
||||
yield value
|
||||
write(value)
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
@@ -129,7 +132,7 @@ class StaticMirrorJob < ApplicationJob
|
||||
private
|
||||
|
||||
def generate(id, value)
|
||||
self.class.update(id) { _1['status'] = 'running' }
|
||||
return unless self.class.update(id) { _1['status'] = 'running' }
|
||||
remaining = MAX_SECONDS - (Time.current.to_f - value.fetch('created_at'))
|
||||
raise Timeout::Error unless remaining.positive?
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする