summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-01-29 19:58:33 -0800
committercolin <colin@cicadas.surf>2024-01-29 19:58:33 -0800
commita243ceab6cd3d17fffb115a253e28a21f2ebe3c6 (patch)
tree4449c1926b156a187ccbd5ace649858761df4f7e
parent06f1c5825254a6806ac34fa8b2797fceaca6c7c9 (diff)
handle errors during archive update
-rw-r--r--fussy.asd2
-rw-r--r--fussy.lisp9
2 files changed, 8 insertions, 3 deletions
diff --git a/fussy.asd b/fussy.asd
index 840dd69..4e606ce 100644
--- a/fussy.asd
+++ b/fussy.asd
@@ -8,7 +8,7 @@
:serial t
:depends-on (#:hyperquirks
#:bknr.datastore
- #:lazybones-hunchentoot
+ #:lazybones/backend/hunchentoot
#:dexador
#:spinneret
#:lass
diff --git a/fussy.lisp b/fussy.lisp
index 2df651e..f593dbc 100644
--- a/fussy.lisp
+++ b/fussy.lisp
@@ -24,8 +24,8 @@ contents."
(retries 10))
"Fetch the package archive from ARCHIVE, a url, and read it in using
the emacs' reader readtable."
- ;; TODO: HANDLE HTTP ERRORS, HANDLE TIMEOUT, HANDLE READ ERRORS
(when (plusp retries)
+ (fussy-log "Fetching archive ~a~%" archive)
(handler-case
(multiple-value-bind (stream status) (dexador:get archive :want-stream t)
(when (= 200 status)
@@ -33,9 +33,14 @@ the emacs' reader readtable."
(*readtable* (emacs-reader-readtable)))
(read stream))))
(usocket:ns-host-not-found-error ()
- (fussy-log "Host Not Found: ~a~%Retrying in ~a seconds...~%"
+ (fussy-log "Error whild fetching archive.~%Host Not Found: ~a~%Retrying in ~a seconds...~%"
archive +retry-wait+)
(sleep +retry-wait+)
+ (fetch-emacs-archive archive (1- retries)))
+ (error (e)
+ (fussy-log "Error while fetching archive: ~a~%Retrying in ~a seconds...~%"
+ e +retry-wait+)
+ (sleep +retry-wait+)
(fetch-emacs-archive archive (1- retries))))))
(defclass/std theme-pkg (db:store-object)