Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@tech-aki

sidekiq と redis

More than 1 year has passed since last update.

sidekiqって?

action malerと使うことが多い

ドキュメント

設定

このファイルに設定 config/initializers/sidekiq.rb

※設定ファイルは基本initilizerに書くみたい

config/sidekiq.yml

※毎回上記のオプションを入力するのは面倒なので、設定ファイルを作成します。

:verbose: false (冗長な)
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
:concurrency:  25
:queues:
  - default
  - event

 コマンド

起動

bundle exec sidekiq -q default event

注意点

sidekiqはデプロイ時にプロセスが切れることがあるみたい

※capistranoで再起動する

記事

これもよさげ

http://shiro-
16.hatenablog.com/entry/2015/10/12/192412

redis(インメモリDB)

Redis provides data storage for Sidekiq.

sidekiqのための ストレージみたい

設定

Sidekiq.configure_server do |config|
  config.redis = { url: 'redis://redis.example.com:7372/0' }
end

Sidekiq.configure_client do |config|
  config.redis = { url: 'redis://redis.example.com:7372/0' }
end

ジョブとは?

バックエンドでさまざまな方法によるキュー操作を実行する

用語

job
バックグラウンドで実行を操作する

エンキュー(enque)
 queに入れること

0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
tech-aki

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?