Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #1098
Closed
Open
Issue created Oct 23, 2018 by Administrator@rootContributor

Error: Could not remove job

Created by: alolis

Description

I am experiencing the following error whenever I try to remove a job:

2018-10-23T14:08:46.619Z - debug: Error: Could not remove job 1
    at /myproject/node_modules/bull/lib/job.js:392:15
From previous event:
    at /myproject/node_modules/bull/lib/job.js:388:42
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

Minimal, Working Test code to reproduce the issue.

I am using the sandboxed environment and the issue is reproducible even with a simple processor like so:

// processor.js
module.exports = function myProcessor(job, done) {
  setTimeout(() => {
    done();
  }, 60000);
}

// normal code
import Queue from 'bull';

const queue = new Queue('myQueue');

queue.process('/path/to/my/processor.js');
await queue.add({foo: 'bar'}, {uuid: 1});

const job = await queue.getJob(1);
await job.remove(); // error here

Bull version

I am using Node.js v6.9.1 with bull v3.4.8 and redis-server v3.0.7

Also by looking at this I understand that I can remove jobs while in progress. Is this true? What is the correct way to force remove a job if indeed true?

Thank you for your time.

Assignee
Assign to
Time tracking