Im attempting to run resque for a rails 7 app on my machine like this: QUEUE=* bundle exec rake resque:work
It fails with this:
rake aborted!TypeError: Unsupported command argument type: Resque::WorkerOriginal Exception (TypeError): Unsupported command argument type: Resque::WorkerOriginal Exception (Resque::PruneDeadWorkerDirtyExit): Worker Davids-Mac-mini:38378:* did not gracefully exit while processing <Unknown Job>
I am sure redis-server
is running correctly
This is my setup
application.rb
config.active_job.queue_adapter = :resque
config/initializers/resque.rb
require 'resque/server'if Rails.env.development? Resque.redis = Redis.new(host: 'localhost', port: '6379')else uri = URI.parse(ENV['REDIS_URL']) REDIS = Redis.new(host: uri.host, port: uri.port, password: uri.password) Resque.redis = REDISend
application_job.rb
class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationErrorend
schedules_job.rb
class SchedulesJob < ApplicationJob queue_as :default def perform(id) puts 'Hello world!' endend
Rakefile
# Add your own tasks in files placed in lib/tasks ending in .rake,# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.require_relative 'config/application'require 'resque'require 'resque/tasks'task 'resque:setup' => :environmentRails.application.load_tasks