Shift setup and add more logging for polling git repositories
This commit is contained in:
parent
cf912ed933
commit
0e09e5af2e
2 changed files with 14 additions and 8 deletions
|
|
@ -33,7 +33,16 @@
|
|||
#:use-module (guix-data-service model git-branch)
|
||||
#:use-module (guix-data-service model git-commit)
|
||||
#:use-module (guix-data-service jobs load-new-guix-revision)
|
||||
#:export (start-thread-to-poll-git-repository))
|
||||
#:export (poll-git-repositories-setup
|
||||
start-thread-to-poll-git-repository))
|
||||
|
||||
(define (poll-git-repositories-setup)
|
||||
(libgit2-init!)
|
||||
|
||||
(set-server-connection-timeout! 60000)
|
||||
(set-server-timeout! 60000)
|
||||
|
||||
(honor-system-x509-certificates!))
|
||||
|
||||
(define (start-thread-to-poll-git-repository git-repository-id)
|
||||
(call-with-new-thread
|
||||
|
|
@ -45,13 +54,6 @@
|
|||
git-repository-id)))
|
||||
(const #t))
|
||||
|
||||
(libgit2-init!)
|
||||
|
||||
(set-server-connection-timeout! 60000)
|
||||
(set-server-timeout! 60000)
|
||||
|
||||
(honor-system-x509-certificates!)
|
||||
|
||||
(with-postgresql-connection
|
||||
(simple-format #f "poll-git-repository-~A"
|
||||
git-repository-id)
|
||||
|
|
@ -121,6 +123,9 @@
|
|||
;; just-update-cached-checkout
|
||||
(just-update-cached-checkout (assq-ref git-repository-details 'url))
|
||||
|
||||
(simple-format (current-error-port)
|
||||
"finished updating cached checkout for repository ~A\n"
|
||||
git-repository-id)
|
||||
(let* ((repository-directory
|
||||
(url-cache-directory
|
||||
(assq-ref git-repository-details 'url)))
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@
|
|||
(lambda ()
|
||||
(run-sqitch)
|
||||
|
||||
(poll-git-repositories-setup)
|
||||
(for-each
|
||||
(lambda (git-repository-details)
|
||||
(let ((id (assq-ref git-repository-details 'id)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue