From 62759c72c94aba3caed724908916b8c06c6c7874 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 20 May 2023 10:06:53 -0700 Subject: xvfb-run to update themes; separate thread to update every 12 hours --- fussy.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fussy.lisp') diff --git a/fussy.lisp b/fussy.lisp index dc5a991..6f818c9 100644 --- a/fussy.lisp +++ b/fussy.lisp @@ -287,7 +287,7 @@ that they are not loaded during image gen.") (defun format-emacs-evocation-script (package-names) (format nil - "env HOME=~a emacs -q --eval ~s --load ~a" + "env HOME=~a xvfb-run emacs -q --eval ~s --load ~a" (full-theme-image-directory) (generate-elisp-to-fetch-and-exclude package-names) (fussy-elisp-script-location))) @@ -324,6 +324,8 @@ that they are not loaded during image gen.") (defvar *fetcher-thread* nil) +(defparameter +twelve-hours+ (* 12 60 60)) + (defun start-fetch-thread () (setf *fetcher-thread* (bt:make-thread @@ -332,7 +334,7 @@ that they are not loaded during image gen.") :when (time-to-update-p) :do (handler-case (update-theme-packages) (error (e) (format *error-output* "~a while updating." e))) - :do (sleep 59)))))) + :do (sleep +twelve-hours+)))))) (defun start (&key config-file) (unless config-file @@ -351,7 +353,7 @@ that they are not loaded during image gen.") :address (address *config*) :domain (domain *config*)))) (create-db) - ;(update-theme-packages) + (update-theme-packages) (reindex-themes-by-package) (lzb:install-app *server* (lzb:app 'fussy::fussy)) (lzb:start-server *server*)) -- cgit v1.2.3