bee-queue / docker-arena

The official docker application for bee-queue arena.
17 stars 15 forks source link

pass in the Queue constructor for bullmq #244

Open mod35 opened 3 years ago

mod35 commented 3 years ago

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