This is the code repository for the DataCite Events REST API.
- Add workers to the app/workers directory
- Ensure you set the shoryuken_options e.g.
shoryuken_options queue: -> { "#{ENV['RAILS_ENV']}\_events" }, auto_delete: true - Queues use environment prefixes. The prefix is set with the environment variable RAILS_ENV locally.
- Workers are disabled in development by default.
- The environment variable DISABLE_QUEUE_WORKER is used in development to switch the worker on or off when you start the container.
- The DISABLE_QUEUE_WORKER is set to nil by defalt in the docker-compose.yml i.e. DISABLE_QUEUE_WORKER=
- If you want to start workers by default when the container spins up set DISABLE_QUEUE_WORKER to a truthy value i.e. 1, TRUE, true, foobar
- Alternatively you can start the workers manually by bashing into the events_api container and running
bundle exec shoryuken -R -C config/shoryuken.yml