18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
|
;;======================================================================
(declare (unit adjutant))
(module adjutant *
(import scheme)
(cond-expand
(chicken-4
(import scheme chicken data-structures extras files)
(import (prefix sqlite3 sqlite3:) posix typed-records srfi-18 srfi-69
md5 message-digest matchable
regex srfi-1)
(import chicken data-structures extras files
posix
))
(chicken-5
(import chicken.base
chicken.process
)
))
(import (prefix sqlite3 sqlite3:) typed-records srfi-18 srfi-69
md5 message-digest matchable
regex srfi-1)
(define (adjutant-run host-type rmt:no-sync-take-job)
(print "Running the adjutant!")
(let loop ((wait-count 0))
(if (< wait-count 10) ;; 6 x 10 seconds = one minute
(let* ((dat (rmt:no-sync-take-job host-type)))
(match dat
|