Commit 731118d3 authored by Shinya Maeda's avatar Shinya Maeda 🥗

Put out schedule_to_db from inclock to avoid deadlock

parent d5740846
......@@ -32,9 +32,9 @@ module Ci
end
def set_data(value)
in_lock do
raise ArgumentError, 'too much data' if value.bytesize > CHUNK_SIZE
raise ArgumentError, 'too much data' if value.bytesize > CHUNK_SIZE
in_lock do
if redis?
redis_set_data(value)
elsif db?
......@@ -44,8 +44,9 @@ module Ci
end
save! if changed?
schedule_to_db if fullfilled?
end
schedule_to_db if fullfilled?
end
def truncate(offset = 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment