Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

resumeOnRestart not working since 1.6.7 #75

@husattil-nc

Description

@husattil-nc

Description

Since version 1.6.7 changes the resumeOnRestart conditions are not matching with the state of the jobs that are running, when the application is restarted.

Current conditions:


          $or: [
            {
              lockedAt: { $exists: true },
              nextRunAt: { $ne: null },
              $or: [{ $expr: { $eq: ['$runCount', '$finishedCount'] } }, { lastFinishedAt: { $exists: false } }],
            },
            {
              lockedAt: { $exists: false },
              lastFinishedAt: { $exists: false },
              nextRunAt: { $lte: now, $ne: null },
            },
          ],

The actual state of the jobs:
{ "_id": { "$oid": "67ee497097744eaf758af160" }, "data": { "sample": "true" }, "name": "LONG_RUNNING_JOB", "attempts": 5, "backoff": { "type": "exponential", "delay": 300000 }, "lastModifiedBy": null, "nextRunAt": null, "priority": 0, "shouldSaveResult": true, "type": "normal", "lockedAt": null, "lastRunAt": { "$date": "2025-04-03T08:40:16.033Z" } }
Downgrading to 1.6.6 is resolving the issue, but we don't want to stick with that version

Code example

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions