Skip to content

Commit

Permalink
fix: improve error message for no queues
Browse files Browse the repository at this point in the history
This causes running docker-arena to appear to completely fail, whereas
it merely needs a configuration file.
  • Loading branch information
Eli Skeggs committed Aug 5, 2020
1 parent bb7a49e commit b8f2afc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/queue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class Queues {
setConfig(config) {
this._config = { ...config, queues: config.queues.slice() };

if (!this._config.queues.length) {
throw new Error('unsupported configuration: no queues configured');
}

if (!this._checkConstructors()) {
throw new TypeError(
'as of 3.0.0, bull-arena requires that the queue constructors be provided to Arena'
Expand Down

0 comments on commit b8f2afc

Please sign in to comment.