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

feat: distance time for delayed jobs #50

Merged
merged 2 commits into from
Jan 15, 2020
Merged

Conversation

ex7r3me
Copy link
Contributor

@ex7r3me ex7r3me commented Jan 14, 2020

I've added a time format for delayed jobs. so it'll show a more human-readable time format instead of the remaining millisecond. for example, it shows about 1 hour instead of 3600000.

a little technical choice here is that I used formatDistance instead of formatDistanceToNow as it was already imported in the Queue.js file. we can also use formatDistanceStrict which would give more exact timing (for example 43 minutes). which one do you think users would be happier with?

- use distance time instead of showing milliseconds
@vcapretz
Copy link
Contributor

hey, @ex7r3me thank you for the PR! really appreciate it

I think going with formatDistanceStrict might be preferable here, so users can have more insights on the delay time.

After you update with this change I can merge the PR! 😄

- use `formatDistanceStrict` instead of `formatDistance`
@ex7r3me
Copy link
Contributor Author

ex7r3me commented Jan 15, 2020

@vcapretz nice!
I tried it and yes it feels better, I've updated the PR with the new function

@vcapretz vcapretz merged commit 63b9d30 into felixmosh:master Jan 15, 2020
@vcapretz
Copy link
Contributor

thank you! just merged, gonna wait to release it

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

Successfully merging this pull request may close these issues.

2 participants