mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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)
|
Jobs.cancel_scheduled_job(:pull_hotlinked_images, post_id: @post.id)
|
||||||
# schedule the job
|
# schedule the job
|
||||||
delay = SiteSetting.ninja_edit_window + 1
|
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
|
end
|
||||||
|
|
||||||
def dirty?
|
def dirty?
|
||||||
|
@ -299,7 +299,7 @@ describe CookedPostProcessor do
|
|||||||
Jobs.expects(:cancel_scheduled_job).with(:pull_hotlinked_images, post_id: post.id).once
|
Jobs.expects(:cancel_scheduled_job).with(:pull_hotlinked_images, post_id: post.id).once
|
||||||
|
|
||||||
delay = SiteSetting.ninja_edit_window + 1
|
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
|
cpp.pull_hotlinked_images
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user