docker-arena icon indicating copy to clipboard operation
docker-arena copied to clipboard

pass in the Queue constructor for bullmq

Open mod35 opened this issue 4 years ago • 0 comments

This PR addresses the default import for bullmq not being the correct Queue constructor that's required to be passed into the Arena constructor.

Testing

with the following config file:

// arena.json
{
  "queues": [
    {
      "name": "node-ts/bus-redis-test",
      "hostId": "Integration test queue",
      "type": "bullmq",
      "redis": {
          "port": 6379,
          "host": "redis"
      }
    }
  ]
}

Accompanied with a docker-compose.yml to assist with networking:

# docker-compose.yml
version: '3'

services:
  redis:
    image: bitnami/redis
    container_name: redis
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    ports:
      - "6379:6379"
  arena:
    image: docker-arena
    container_name: arena
    links:
      - redis
    ports:
      - "4567:4567"
    volumes:
      - "./arena.json:/opt/arena/index.json"

it would fail the moment you try to access the specified queue in the UI with the following error message:

2021-08-02 22 08 12

image

Specifically BullMQ is not a constructor.

With the fix

2021-08-02 22 14 54

mod35 avatar Aug 02 '21 12:08 mod35