Ondřej Budai
ab3990b90a
dbjobqueue: fix FinishJob not returning an error if already finished
...
Reported by covscan
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-12-18 00:14:07 +00:00
Gianluca Zuccarelli
1a709eda5c
metrics: add initial job metrics
...
Add job metrics to track the number of
pending/running jobs, the duration of
the jobs and how long the jobs spent in
the job queue.
2021-12-08 21:49:43 +00:00
sanne
c43ad2b22a
osbuild-service-maintenance: Clean up expired images
2021-12-03 00:14:09 +00:00
Ondřej Budai
14b29ae98a
dbjobqueue: don't log when context's deadline was exceeded
...
This happens rather often as we limit the request job timeout to 20s on the
service.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-11-25 08:20:22 +01:00
Diaa Sami
df73b835c3
jobqueue: improve logging
...
Add job ID where it's missing
2021-11-16 19:16:34 +01:00
Diaa Sami
9c6438c8f4
jobqueue: include dependent job IDs when logging
2021-11-16 19:16:34 +01:00
Ondřej Budai
d3a3dbafed
jobqueue: add DequeueByID
...
We will soon need to dequeue a job using its ID. This commit adds ability
to do that to the Jobqueue interface. As always, the fsjobqueue implementation
is slightly naive but it should fine for the usecases that it's designed for.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-11-14 10:17:03 +01:00
Diaa Sami
751ef84fc1
jobqueue: Better logging
...
Use appropriate logging levels for different statements
Log important jobqueue events with relevant information
2021-10-19 10:03:39 +01:00
sanne
d25ae71fef
worker: Configurable timeout for RequestJob
...
This is backwards compatible, as long as the timeout is 0 (never
timeout), which is the default.
In case of the dbjobqueue the underlying timeout is due to
context.Canceled, context.DeadlineExceeded, or net.Error with Timeout()
true. For the fsjobqueue only the first two are considered.
2021-10-19 00:12:18 +01:00
sanne
9fab5def90
dbjobqueue: Reduce error noise in rollback check
...
If the transaction is already closed don't log the rollback failure as
an error, it means it was successfully committed.
2021-08-20 15:42:57 +02:00
Lars Karlitski
9c2c92f729
jobqueue: Introduce jobqueue backed by a postgres database
...
Co-authored-by: sanne <sanne.raymaekers@gmail.com>
2021-07-28 21:52:31 +01:00