ninja_edit_window is is seconds, not minutes

This commit is contained in:
Régis Hanol 2013-11-06 11:08:57 +01:00
parent eebaf509e2
commit 3992aa971d
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ class CookedPostProcessor
Jobs.cancel_scheduled_job(:pull_hotlinked_images, post_id: @post.id)
# schedule the job
delay = SiteSetting.ninja_edit_window + 1
Jobs.enqueue_in(delay.minutes.to_i, :pull_hotlinked_images, post_id: @post.id)
Jobs.enqueue_in(delay.seconds.to_i, :pull_hotlinked_images, post_id: @post.id)
end
def dirty?

View File

@ -299,7 +299,7 @@ describe CookedPostProcessor do
Jobs.expects(:cancel_scheduled_job).with(:pull_hotlinked_images, post_id: post.id).once
delay = SiteSetting.ninja_edit_window + 1
Jobs.expects(:enqueue_in).with(delay.minutes, :pull_hotlinked_images, post_id: post.id).once
Jobs.expects(:enqueue_in).with(delay.seconds, :pull_hotlinked_images, post_id: post.id).once
cpp.pull_hotlinked_images
end