Executions counting is not a serialization concern

Let’s do it when we actually execute instead. Then the tests dealing
with comparable serializations won’t fail either!
上级 779148d3
......@@ -83,7 +83,7 @@ def serialize
'queue_name' => queue_name,
'priority' => priority,
'arguments' => serialize_arguments(arguments),
'executions' => executions + 1,
'executions' => executions,
'locale' => I18n.locale.to_s
}
end
......
......@@ -31,6 +31,7 @@ def execute(job_data) #:nodoc:
def perform_now
deserialize_arguments_if_needed
run_callbacks :perform do
self.executions = executions + 1
perform(*arguments)
end
rescue => exception
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册