1
如何以編程方式在Sidekiq中失敗一項工作?Sidekiq工作 - 返回失敗或條件成功
調用system('some_command')
裏面的一個perform()
函數總是返回一個成功的作業。
我想根據這樣的條件無法工作:提前
def perform(data)
output = system('some_command')
if output
# return this job as :success
else
# return this job as :fail
end
end
感謝
感謝。爲更清潔的代碼+1 – goo