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

Add que_jobs.created_at ? #33

Closed
joevandyk opened this issue Mar 11, 2014 · 3 comments
Closed

Add que_jobs.created_at ? #33

joevandyk opened this issue Mar 11, 2014 · 3 comments

Comments

@joevandyk
Copy link
Contributor

Not sure if it would be helpful to have a timestamp that indicates when the job was created. Possibly when it was last ran as well.

I suppose you could figure that out from the retry count and the retry interval though..

Thoughts?

@chanks
Copy link
Collaborator

chanks commented Mar 12, 2014

I thought a while ago about adding the usual created_at and updated_at (effectively ran_at) timestamps, but felt that all the information I'd really want out of them I'd already be getting from the error_count. I'm open to adding them if you can think of a case where they'd be useful. I'm generally hesitant to make the jobs table any wider than it needs to be, but it's only 16 bytes.

@ivawzh
Copy link

ivawzh commented Oct 17, 2016

I want to regularly run a health check to see if workers are frozen. My plan is to query count of jobs which are created more than 20 mins ago. If returned number is not 0, I would assume workers not healthy. Is there anyway you can achieve the same check with run_at but not missing the never ran jobs? Cheers.

@chanks
Copy link
Collaborator

chanks commented Oct 17, 2016

You can add your own created_at column if you really want to (ALTER TABLE que_jobs ADD COLUMN created_at NOT NULL DEFAULT now() should do it). I
don't see any reason it would interfere with normal operation.

On Monday, October 17, 2016, Ivan Wang notifications@github.com wrote:

I want to regularly run a health check in question to see if workers are
frozen. My plan is query count of jobs which are created more than 20 mins
ago. If returned number is not 0, I would assume workers not healthy. Is
there anyway you can achieve the same check with run_at but not missing the
never ran jobs? Cheers.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#33 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AASUGr0Dkjec8vRhl0JRz5o6imfOKKzDks5q0x3wgaJpZM4BogUZ
.

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

3 participants