diff options
Diffstat (limited to 'guix-build-coordinator/datastore.scm')
-rw-r--r-- | guix-build-coordinator/datastore.scm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/guix-build-coordinator/datastore.scm b/guix-build-coordinator/datastore.scm index dc4fec6..5768630 100644 --- a/guix-build-coordinator/datastore.scm +++ b/guix-build-coordinator/datastore.scm @@ -6,7 +6,8 @@ #:use-module (guix-build-coordinator datastore postgresql) #:duplicates (merge-generics) #:export (database-uri->datastore - datastore-find-build-output)) + datastore-find-build-output + datastore-validate-datetime-string)) (re-export datastore-optimize) (re-export datastore-spawn-fibers) @@ -92,19 +93,24 @@ (re-export datastore-fetch-build-to-allocate) (re-export datastore-check-if-derivation-conflicts?) (re-export datastore-insert-to-allocated-builds) +(re-export datastore-update-allocated-build-submit-outputs) +(re-export datastore-insert-background-job) +(re-export datastore-delete-background-job) +(re-export datastore-select-background-jobs) +(re-export datastore-check-and-correct-unprocessed-builds-all-inputs-built) (define* (database-uri->datastore database #:key metrics-registry - worker-thread-log-exception?) + thread-pool-log-exception?) (cond ((string-prefix? "pg://" database) (postgresql-datastore database)) ((string-prefix? "sqlite://" database) (sqlite-datastore database #:metrics-registry metrics-registry - #:worker-thread-log-exception? - worker-thread-log-exception?)) + #:thread-pool-log-exception? + thread-pool-log-exception?)) (else (error (simple-format #f "Unknown database ~A" database))))) @@ -119,3 +125,6 @@ (assq-ref output 'output) #f)) outputs))) + +(define (datastore-validate-datetime-string s) + (strftime "%F %T" (car (strptime "%F %T" s)))) |