Add missing empty job log entry
This commit is contained in:
parent
4f1ae74d2f
commit
7891d1327b
1 changed files with 13 additions and 0 deletions
|
|
@ -36,6 +36,17 @@
|
||||||
(define (log-part-sequence-name job-id)
|
(define (log-part-sequence-name job-id)
|
||||||
(simple-format #f "load_new_guix_revision_job_log_parts_id_seq_~A" job-id))
|
(simple-format #f "load_new_guix_revision_job_log_parts_id_seq_~A" job-id))
|
||||||
|
|
||||||
|
(define (insert-empty-log-entry conn job-id)
|
||||||
|
(exec-query
|
||||||
|
conn
|
||||||
|
"DELETE FROM load_new_guix_revision_job_logs WHERE job_id = $1"
|
||||||
|
(list job-id))
|
||||||
|
(exec-query
|
||||||
|
conn
|
||||||
|
"INSERT INTO load_new_guix_revision_job_logs (job_id, contents) VALUES
|
||||||
|
($1, NULL)"
|
||||||
|
(list job-id)))
|
||||||
|
|
||||||
(define (start-thread-for-process-output job-id)
|
(define (start-thread-for-process-output job-id)
|
||||||
(define (insert conn job_id s)
|
(define (insert conn job_id s)
|
||||||
(exec-query
|
(exec-query
|
||||||
|
|
@ -71,6 +82,8 @@ VALUES (nextval('" (log-part-sequence-name job_id) "'), $1, $2)")
|
||||||
"DELETE FROM load_new_guix_revision_job_log_parts WHERE job_id = $1"
|
"DELETE FROM load_new_guix_revision_job_log_parts WHERE job_id = $1"
|
||||||
(list job-id))
|
(list job-id))
|
||||||
|
|
||||||
|
(insert-empty-log-entry logging-conn job-id)
|
||||||
|
|
||||||
(let loop ((line (get-line port-to-read-from)))
|
(let loop ((line (get-line port-to-read-from)))
|
||||||
(if (eof-object? line)
|
(if (eof-object? line)
|
||||||
(simple-format #t "finished reading logs for ~A\n"
|
(simple-format #t "finished reading logs for ~A\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue