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.initial_run_at ? #325

Open
paul110 opened this issue Jan 6, 2022 · 1 comment
Open

Add que_jobs.initial_run_at ? #325

paul110 opened this issue Jan 6, 2022 · 1 comment

Comments

@paul110
Copy link

paul110 commented Jan 6, 2022

Hi,

This is somewhat similar to this (quite old) issue #33 (which I think would likely still be a "nice to have") but we think that an initial_run_at would likely be a lot more useful.

Our use case is that we are trying to see how backed up Que jobs are in order to set alarms based on that. The issue is that currently in order to determine the job_delay, we need to do something along these lines:

  • if error_count = 0 => job_delay = now() - run_at
  • if error_count > 0 => job_delay = now() - F(run_at, error_count)

The major benefit in adding initial_run_at would be to make this always be:

job_delay = now() - initial_run_at

regardless of the error_count.

Is there any appetite for adding the column initial_run_at (and also potentially created_at as a nice to have)?

Thanks,
Paul

@hlascelles
Copy link
Contributor

If we take into account (thank you @owst) the job execution time, it would be job_delay = now() - initial_run_at - elapsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants