LoginSignup
1
1

More than 5 years have passed since last update.

ResqueのSetup

Posted at
  1. Redisのインストール

brew install redis

  1. Redisの起動

redis-server /usr/local/etc/redis.conf

  1. Resqueのインストール

    2015/8/16現在、ver.1.52.2 がインストールされる。

  gem 'resque'

プレリリースの2.0.0は以下でインストールできる。

  gem 'resque', '~> 2.0.0.pre.1', github: 'resque/resque'
  1. インストール実行

bundle install

  1. workerの起動

1系の場合、workerはrake taskとして起動する。

lib/tasks/resque.rake
  require 'resque/tasks'
  task 'resque:work' => :environment

workerの起動。

  TERM_CHILD=1 QUEUE=* bundle exec rake resque:work

TERM_CHILD=1を指定しないとWarningが出る。

resque.rakeの2行目を書かずに、rakeコマンド実行時に指定することもできる。

  TERM_CHILD=1 QUEUE=* bundle exec rake environment resque:work

2系の場合、コマンドで実行できる。

  bundle exec resque work
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1