Automattic / Automattic/kue

nodemon quits when the first job worker is done

Open
#1,155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.4k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

First, thank you for this fantastic tool.

```
const kue = require('kue');
const ENV = require('/srv/shared/env.js');
const jobs = kue.createQueue({ redis: ENV.REDIS });
const worker = require('./worker.js');

jobs.process('fetch_group', 1, worker);
kue.app.listen(80);
```

I run this code through docker with `nodemon jobs.js` and nodemon quits as soon as the first job has been processed.

Isn't `.process()` supposed to listen to incoming jobs and not return?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the supplied jobs.js example, worker.js, and the jobs.process('fetch_group', 1, worker) call; run it under nodemon in Docker and observe what happens after the first job completes. Trace the worker and queue lifecycle, then verify that the process continues listening for incoming jobs instead of exiting.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript, node.js, redis
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.