-
Notifications
You must be signed in to change notification settings - Fork 38
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
Running even though there are no jobs available? #124
Comments
@klodoma It looks like it's lost it's handle to an entry in the dtc_queue_run table. Every time run is called it's supposed to create an entry in dtc_queue_run. It then is supposed to update that entry with a heartbeat while the job cycles (that's the UPDATE you're being). Then it will continually poll the database for new jobs (that's the SELECT... you're seeing). These debug messages are correct, but the missing entry in dtc_queue_run is more concerning (there should be an entry that shows up with ID 8). Is there anything from the beginning of the log? |
Ok, I had a look at the code and how it runs. So far it all makes sense. Are there so many real-life use-cases are there in order to run this loop so often(a frw times / second), especially the sleep time if no jobs are available, especially, running a database query to see if it needs to run?
Practically, this solves the "watch or monitor" problem, like, watching for new jobs, if I need to execute smth etc... =============================================== Did you considered using a local file for monitoring instead if executing database queries? Like save all these executions?
For example, every time a dtc_queue_job change occurs, new job created, timed etc... you put the execution time in a file, or you put just the "next-run-timestamp" in that file and monitor in the loop only that file. (no database queries, no nothing needs to be executed); from time-to-time you re-read the database and update there the heart-beat but that can occur every now and then... |
I am not sure since when this is happening, but I think it has something to do with the latest upgrade.
If I run
then I get the following logs, although there no jobs in queue or whatsoever.
dtc_queue_job, dtc_queue_run tables are empty.
Does this make sense?
The text was updated successfully, but these errors were encountered: