mirror of
git://git.savannah.gnu.org/guix/data-service.git
synced 2023-12-14 03:23:03 +01:00
Remove logging from enqueue-job-for-email
As getmail treats output to stderr as the operation failing.
This commit is contained in:
parent
b0404d62fd
commit
d72b9a5239
1 changed files with 35 additions and 38 deletions
|
@ -23,6 +23,7 @@
|
||||||
#:use-module (squee)
|
#:use-module (squee)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (guix channels)
|
#:use-module (guix channels)
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix-data-service database)
|
#:use-module (guix-data-service database)
|
||||||
#:use-module (guix-data-service model git-repository)
|
#:use-module (guix-data-service model git-repository)
|
||||||
#:use-module (guix-data-service model git-branch)
|
#:use-module (guix-data-service model git-branch)
|
||||||
|
@ -89,29 +90,28 @@
|
||||||
(channel-instance
|
(channel-instance
|
||||||
;; Obtain a session level lock here, to avoid conflicts with
|
;; Obtain a session level lock here, to avoid conflicts with
|
||||||
;; other jobs over the Git repository.
|
;; other jobs over the Git repository.
|
||||||
(with-advisory-session-lock/log-time
|
(with-advisory-session-lock
|
||||||
conn
|
conn
|
||||||
'latest-channel-instances
|
'latest-channel-instances
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
(parameterize ((current-output-port (%make-void-port "w"))
|
||||||
|
(current-error-port (%make-void-port "w"))
|
||||||
|
(guix-warning-port (%make-void-port "w")))
|
||||||
(with-store store
|
(with-store store
|
||||||
(first
|
(first
|
||||||
(latest-channel-instances store
|
(latest-channel-instances store
|
||||||
(list channel-for-commit)
|
(list channel-for-commit)
|
||||||
#:authenticate?
|
#:authenticate?
|
||||||
(fourth git-repository-details))))))))
|
(fourth git-repository-details)))))))))
|
||||||
|
|
||||||
(if (string=? (channel-instance-commit channel-instance)
|
(when (string=? (channel-instance-commit channel-instance)
|
||||||
x-git-newrev)
|
x-git-newrev)
|
||||||
(with-postgresql-transaction
|
(with-postgresql-transaction
|
||||||
conn
|
conn
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(exec-query conn "LOCK TABLE git_commits IN EXCLUSIVE MODE")
|
(exec-query conn "LOCK TABLE git_commits IN EXCLUSIVE MODE")
|
||||||
|
|
||||||
(if (git-commit-exists? conn x-git-newrev)
|
(unless (git-commit-exists? conn x-git-newrev)
|
||||||
(simple-format #t "commit already exists for revision ~A (date: ~A)\n"
|
|
||||||
x-git-newrev
|
|
||||||
date)
|
|
||||||
(begin
|
|
||||||
(insert-git-commit-entry conn
|
(insert-git-commit-entry conn
|
||||||
(or (git-branch-for-repository-and-name
|
(or (git-branch-for-repository-and-name
|
||||||
conn
|
conn
|
||||||
|
@ -129,7 +129,4 @@
|
||||||
git-repository-id
|
git-repository-id
|
||||||
x-git-newrev
|
x-git-newrev
|
||||||
(string-append x-git-repo " "
|
(string-append x-git-repo " "
|
||||||
x-git-refname " updated"))))))
|
x-git-refname " updated"))))))))))))))))
|
||||||
(simple-format #t "email newrev ~A doesn't match latest channel instance commit ~A\n"
|
|
||||||
x-git-newrev
|
|
||||||
(channel-instance-commit channel-instance)))))))))))))
|
|
||||||
|
|
Loading…
Reference in a new issue