Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thanhluanuit/sidekiq-activejob

Rails 5 - Active Job - Sidekiq
https://github.com/thanhluanuit/sidekiq-activejob

activejob rails5 sidekiq

Last synced: 1 day ago
JSON representation

Rails 5 - Active Job - Sidekiq

Awesome Lists containing this project

README

        

# ActiveJob - Sidekiq Configuration
1. Add gem 'sidekiq'
2. Add sidekiq.rb to config/initializers/

```ruby
Sidekiq.configure_server do |config|
config.redis = { url: 'redis://localhost:6379' }
end

Sidekiq.configure_client do |config|
config.redis = { url: 'redis://localhost:6379' }
end
```

```
Redis url format: 'redis://ip:port'
```

3. Setting queue adapter in config/application.rb

```ruby
module SidekiqApp
class Application < Rails::Application
# Be sure to have the adapter's gem in your Gemfile
# and follow the adapter's specific installation
# and deployment instructions.
config.active_job.queue_adapter = :sidekiq
end
end
```

4. Advance configuration: config/sidekiq.yml
```
:verbose: true
development:
:concurrency: 1
production:
:concurrency: 20
:queues:
- critical
- default
- mailers
- low
:timeout: 60
```