mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Fix worker load
This commit is contained in:
parent
0a618c5895
commit
72947b6606
2 changed files with 2 additions and 3 deletions
|
@ -33,7 +33,7 @@ Sidekiq.configure_client do |config|
|
||||||
config.redis = { namespace: 'neocitiesworker' }
|
config.redis = { namespace: 'neocitiesworker' }
|
||||||
end
|
end
|
||||||
|
|
||||||
require File.join(DIR_ROOT, 'jobs', 'screenshot_job.rb')
|
require File.join(DIR_ROOT, 'workers', 'screenshot_worker.rb')
|
||||||
|
|
||||||
Sequel.datetime_class = Time
|
Sequel.datetime_class = Time
|
||||||
Sequel.extension :pagination
|
Sequel.extension :pagination
|
||||||
|
|
|
@ -3,8 +3,7 @@ require 'RMagick'
|
||||||
|
|
||||||
class ScreenshotWorker
|
class ScreenshotWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
queue :screenshots
|
sidekiq_options queue: :screenshots, retry: true, backtrace: true
|
||||||
retry 10
|
|
||||||
|
|
||||||
def perform(username)
|
def perform(username)
|
||||||
screenshot = Tempfile.new 'neocities_screenshot'
|
screenshot = Tempfile.new 'neocities_screenshot'
|
||||||
|
|
Loading…
Add table
Reference in a new issue