If you’ve ever used Topic List Previews, you may have noticed there’s a delay before the Topic List image preview includes the preview image.
The topic list image seems to be dependent on the sidekiq job
PullHotlinkedImages which is why these plugin/themes won’t work without sidekiq running.
Recently I’ve been trying to persuade a Facebook group to move over to Discourse and whilst there are many (many!) reasons you’d do so, one of the features I like about Facebook is the almost instant image Preview you get when posting a link.
So i’m trying to increase the frequency of the
PullHotlinkedImages so that TLP generates the Topic image asap so you don’t have to wait the usual 1 to 5 minutes for it to happen.
However, despite attempting to override the jobs code in my
plugin.rb like so, the job still runs in the ‘low’ queue.
after_initialize do Jobs.module_eval do class PullHotlinkedImages < Jobs::Base sidekiq_options queue: 'critical' def initialize
No errors in the logs, no issue starting up discourse (No errors in the console).
Am I making a newb error?
Is there a better way to override the job urgency?
PS And yes, I know I’m messing with a carefully balanced system here, but I’d still like to experiment with how far I can stress the server.