Periodically GC expired emails
This commit is contained in:
parent
b5ef36a1bb
commit
eeba024c1f
|
@ -7,6 +7,7 @@
|
||||||
#:use-module (gnu services certbot)
|
#:use-module (gnu services certbot)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services databases)
|
#:use-module (gnu services databases)
|
||||||
|
#:use-module (gnu services mcron)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
#:use-module (gnu services web)
|
#:use-module (gnu services web)
|
||||||
#:use-module (gnu system shadow)
|
#:use-module (gnu system shadow)
|
||||||
|
@ -131,11 +132,20 @@
|
||||||
(datarekisteri-backend)
|
(datarekisteri-backend)
|
||||||
(list datarekisteri-backend)))
|
(list datarekisteri-backend)))
|
||||||
|
|
||||||
|
(define (backend-mcron-jobs config)
|
||||||
|
(match-record config <plain-datarekisteri-backend-configuration>
|
||||||
|
(datarekisteri-backend)
|
||||||
|
(list
|
||||||
|
#~(job '(next-minute '(0))
|
||||||
|
(string-append #$datarekisteri-backend "/bin/datarekisteri-cli gc-expired-emails")
|
||||||
|
#:user "datarekisteri-backend"))))
|
||||||
|
|
||||||
(define plain-datarekisteri-backend-service-type
|
(define plain-datarekisteri-backend-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'plain-datarekisteri-backend)
|
(name 'plain-datarekisteri-backend)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension account-service-type backend-accounts)
|
(list (service-extension account-service-type backend-accounts)
|
||||||
|
(service-extension mcron-service-type backend-mcron-jobs)
|
||||||
(service-extension postgresql-role-service-type backend-postgresql-roles)
|
(service-extension postgresql-role-service-type backend-postgresql-roles)
|
||||||
(service-extension profile-service-type backend-profile)
|
(service-extension profile-service-type backend-profile)
|
||||||
(service-extension shepherd-root-service-type backend-shepherd-service)))
|
(service-extension shepherd-root-service-type backend-shepherd-service)))
|
||||||
|
|
Loading…
Reference in New Issue