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(rq): Add enqueued_at and started_at to rq job extra #1024

Merged
merged 7 commits into from
Jan 4, 2023
Merged

feat(rq): Add enqueued_at and started_at to rq job extra #1024

merged 7 commits into from
Jan 4, 2023

Conversation

kruvasyan
Copy link
Contributor

@kruvasyan kruvasyan commented Feb 16, 2021

Fixes: #144

Add enqueued_at and started_at to extra["rq-job"] on RQ integration

The test was a bit tricky because the job was missing the started_at attribute after the worker finished. I added information about this to the commit with test.

Also another question. Are we satisfied that the time in the fields will be in the format '2021-02-16 18:55:17.220349', or do we need some special format?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
The started_at attribute of a job becomes None after the worker
finishes, because the worker calls the cleanup method of the job,
which erases some of the meta-information. So immediately after
creating a job, we call save to save this information to redis
and after refresh to load it. The same technique is used in the rq
library itself when testing the job module.
@kruvasyan
Copy link
Contributor Author

kruvasyan commented Feb 16, 2021

Hm, the same tests fail in the master before PR changes. I guess I have to wait for the green master

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…nto feature/rq-job-add-extra
@github-actions
Copy link

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@sl0thentr0py sl0thentr0py self-assigned this Jan 3, 2023
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very late but thx for adding this @kruvasyan !

@sl0thentr0py sl0thentr0py merged commit 1578832 into getsentry:master Jan 4, 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

Successfully merging this pull request may close these issues.

queue time and time since job started on RQ integration
2 participants