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

Timestamp handling #138

Closed
wenq1 opened this issue Feb 13, 2020 · 6 comments
Closed

Timestamp handling #138

wenq1 opened this issue Feb 13, 2020 · 6 comments

Comments

@wenq1
Copy link

wenq1 commented Feb 13, 2020

In bullmqv4, Job.fromJSON () method, job.timestamp is not recovered (in fact commented out).

// job.delay = parseInt(json.delay);
// job.timestamp = parseInt(json.timestamp);

This creates a problem for UI when trying to read jobs from IDs. The timestamp will always be set to Date.now () in the constructor, regardless of the timestamp stashed in RedisLayer.

this.timestamp = opts.timestamp ? opts.timestamp : Date.now();

Sounds like a bug?

@wenq1
Copy link
Author

wenq1 commented Feb 20, 2020

Anyone?

@jamesholcomb
Copy link

Running into this as well. Have you tried uncommenting?

@wenq1
Copy link
Author

wenq1 commented Feb 21, 2020

uncommenting will work.

However I open a thread here so as to discuss the intention of this regression, or if it a feature rather than a regression.

@wenq1
Copy link
Author

wenq1 commented Feb 21, 2020

Is @manast still hiding?

@manast
Copy link
Contributor

manast commented Feb 26, 2020

I am a bit confused too why these are out commented, should work to uncommented AFAICS.

@onehorsetown
Copy link
Contributor

@manast - Do you want a pull request for un-commenting out those two lines of code?

@wenq1 wenq1 mentioned this issue Mar 2, 2020
manast pushed a commit that referenced this issue Mar 3, 2020
…-03)

### Bug Fixes

* restore the Job timestamp when deserializing JSON data ([#138](#138)) ([#152](#152)) ([c171bd4](c171bd4))
@wenq1 wenq1 closed this as completed Mar 4, 2020
manast added a commit that referenced this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants