简体   繁体   English

无法启动Resque Worker

[英]Unable to start resque worker

I am trying to use resque with active job. 我正在尝试使用resque与积极的工作。 I am following the introductions specified in the link 我正在按照链接中指定的介绍进行操作

When ever I tried to start resque with the following command 每当我尝试使用以下命令启动resque时

bundle exec rake resque:work

I get the following error 我收到以下错误

The controller-level `respond_to' feature has been extracted to the `responders` gem. Add it to your Gemfile to continue using this feature:
  gem 'responders', '~> 2.0'
Consult the Rails upgrade guide for details.

Please look at my Gemfile once 请一次查看我的Gemfile

source 'https://rubygems.org'

gem 'rails', '4.2.5'

gem 'rails-api', "~> 0.4.0"

gem 'spring', :group => :development

gem "activerecord-import", "~> 0.4.0"

gem 'mysql2', "~> 0.3.0"

gem 'delayed_job'

gem "delayed_job_web"

gem 'delayed_job_active_record'

gem "daemons"

gem 'resque'

gem 'responders'


# ADD-ONS

# Require smarter_csv for data import
gem "smarter_csv", "~> 1.0.19"
gem "active_model_serializers", "~> 0.8.0"
gem "kaminari", "~> 0.16.0"
gem "api-pagination", "~> 4.0.0"
gem "colorize", "~> 0.7.5"
gem "versionist", "~> 1.4.0"
gem "httpclient", "~> 2.6.0.1"
gem "rest-client", "~> 1.7.0"
gem 'devise', '~> 3.4.1'
gem 'omniauth-facebook',"~> 2.0.1"
gem "omniauth-google-oauth2","~> 0.2.6"
# git@github.com:baschtl/devise-token_authenticatable.git
gem 'devise-token_authenticatable'
gem "devise-encryptable" ,'~> 0.1.2'
gem 'minitest', '~> 5.5'
gem "bunny", ">= 1.7.0"
gem 'aws-sdk', '~> 2'
gem 'rantly', '~> 0.3.1'
gem 'forgery', '~> 0.6.0'
gem 'unicorn', '~> 4.8.3'

What is the problem ? 问题是什么 ? I am not able to find the solutions online. 我无法在线找到解决方案。 I am using rails 4.2.5 Also active_model_serializers had to be pinned to 0.8.0. 我使用的是Rails 4.2.5,还必须将active_model_serializers固定为0.8.0。

Thanks in advance. 提前致谢。

My way (don't forget to start redis-server): 我的方式(不要忘记启动redis-server):

$ git clone  https://github.com/cristianbica/activejob-resque.git
$ cd activejob-resque/
$ bundle install
...
$ TERM_CHILD=1 LOGGING=1 QUEUE=* bundle exec rake resque:work
activejob-resque]$ TERM_CHILD=1 LOGGING=1 QUEUE=* bundle exec rake resque:work
*** Starting worker test.lo:17635:*
*** Registered signals
*** Running before_first_fork hooks
*** Checking default
*** Sleeping for 5.0 seconds
*** resque-1.25.2: Waiting for *
...

Deprecation warnings excluded. 弃用警告已排除。 Pay attention 请注意

$ bundle exec rake resque:work
set QUEUE env var, e.g. $ QUEUE=critical,high rake resque:work

You shoul set QUEUE enviromental variable at least. 您至少应设置QUEUE环境变量。 Above action just for test, but try it first of all. 以上动作仅用于测试,但首先请尝试。 Works for me. 为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM