Tue Jun 28 17:03:09 UTC 2011 pix@kepibu.org
* Make #'run-for-a-while take the number of iterations as an argument
diff -rN -u old-claki/claki.lisp new-claki/claki.lisp
--- old-claki/claki.lisp 2013-07-22 03:25:12.000000000 +0000
+++ new-claki/claki.lisp 2013-07-22 03:25:12.000000000 +0000
@@ -236,9 +236,9 @@
(defconstant +simple-time+ '(:year #\- (:month 2) #\- (:day 2) #\Space (:hour 2) #\: (:min 2) #\: (:sec 2)))
(defun now () (local-time:format-timestring nil (local-time:now) :format +simple-time+))
-(defun run-for-a-while ()
+(defun run-for-a-while (times)
(format t "; Beginning run at ~a~%" (now))
- (dotimes (i (* 2 24))
+ (dotimes (i times)
(sleep (minutes (plus-or-minus 30 5)))
(format t "; Unattended run at ~a~%" (now))
(unattended-revert-new-spam)
@@ -247,7 +247,7 @@
#+(or)
(let ((stdout *standard-output*))
- (sb-thread:make-thread (lambda () (let ((*standard-output* stdout)) (run-for-a-while)))
+ (sb-thread:make-thread (lambda () (let ((*standard-output* stdout)) (run-for-a-while (* 2 48))))
:name "cliki reverter"))
(defvar *state-file* (merge-pathnames #p"state/" (directory-namestring (or #.*load-pathname* #p"/home/pixel/repos/"))))