ninja_edit_window is is seconds, not minutes
This commit is contained in:
parent
eebaf509e2
commit
3992aa971d
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue