Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to v1.6.2 makes all previous jobs enqueued #50

Closed
litsynp opened this issue Aug 16, 2024 · 5 comments · Fixed by #51
Closed

Updating to v1.6.2 makes all previous jobs enqueued #50

litsynp opened this issue Aug 16, 2024 · 5 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@litsynp
Copy link

litsynp commented Aug 16, 2024

Description

Hi. We recently migrated from Agenda to pulse. Projects that migrated to pulse v1.6.1 seem to work fine without issues, but installing v1.6.2 seems to make nextRunAt of all jobs to be set to be now(), which makes the Pulse to lock and restart all our previously completed jobs to start all over again.

Setting resumeOnRestart: true would prevent this though.

Code example

No response

Additional context

No response

@litsynp litsynp added the bug Something isn't working label Aug 16, 2024
@code-xhyun
Copy link
Contributor

@litsynp We apologize. We have just become aware of this issue and are working on resolving it. We will address it promptly.

@code-xhyun
Copy link
Contributor

@litsynp Could you provide us with a sample of the data that should not be executed?

@litsynp
Copy link
Author

litsynp commented Aug 16, 2024

@code-xhyun Thank you for the quick response. Here's a sample data.

{
  "_id": {
    "$oid": "66bf05cad0633e28dcd2fb4a"
  },
  "name": "SOME_TASK_NAME",
  "data": { "items": [1, 2, 3] },
  "priority": 0,
  "shouldSaveResult": false,
  "type": "normal",
  "nextRunAt": null,
  "lastModifiedBy": null,
  "lockedAt": null,
  "lastRunAt": {
    "$date": "2023-05-23T02:40:17.839Z"
  },
  "result": { "items": [2, 3, 4] },
  "lastFinishedAt": {
    "$date": "2023-05-23T03:16:33.810Z"
  }
}

The dates lastFinishedAt and lastRunAt should mean the job has already been completed, but Pulse would set like nextRunAt: { "$date": "2024-08-16T03:04:55.969Z" }, making the job to restart.

Related is #49.

@code-xhyun
Copy link
Contributor

@litsynp A version that we believe has solved this issue has been deployed (v 1.6.3).
Please check it out.

npm package (@latest dist-tag)
GitHub release

@litsynp
Copy link
Author

litsynp commented Aug 20, 2024

@code-xhyun After the 1.6.3 update, I checked that it's going well without any issues. Thank you for your quick process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants