51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
(import scheme chicken data-structures extras)
(use
(prefix base64 base64:)
(prefix dbi dbi:)
(prefix nanomsg nmsg:)
(prefix sqlite3 sqlite3:)
call-with-environment-variables
canvas-draw
csv
csv-xml
data-structures
directory-utils
dot-locking
extras
files
fmt
format
hostinfo
http-client
intarweb
irregex
(prefix iup iup:)
matchable
md5
message-digest
pathname-expand
pkts
ports
posix
|
<
<
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
(import scheme chicken data-structures extras)
(use
(prefix base64 base64:)
(prefix dbi dbi:)
(prefix nanomsg nmsg:)
(prefix sqlite3 sqlite3:)
call-with-environment-variables
csv
csv-xml
data-structures
directory-utils
dot-locking
extras
files
fmt
format
hostinfo
http-client
intarweb
irregex
matchable
md5
message-digest
pathname-expand
pkts
ports
posix
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
)
(use (prefix mtconfigf configf:))
(define read-config configf:read-config)
(define find-and-read-config configf:find-and-read-config)
(define config:eval-string-in-environment configf:eval-string-in-environment)
(import canvas-draw-iup spiffy)
;; (import apimod)
;; (import archivemod)
;; (import clientmod)
;; (import commonmod)
;; (import dbmod)
;; (import dcommonmod)
|
|
|
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
)
(use (prefix mtconfigf configf:))
(define read-config configf:read-config)
(define find-and-read-config configf:find-and-read-config)
(define config:eval-string-in-environment configf:eval-string-in-environment)
(import spiffy)
;; (import apimod)
;; (import archivemod)
;; (import clientmod)
;; (import commonmod)
;; (import dbmod)
;; (import dcommonmod)
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
(include "common_records.scm")
(include "db_records.scm")
(include "key_records.scm")
(include "run_records.scm")
(include "task_records.scm")
(include "test_records.scm")
(include "vg_records.scm")
;;======================================================================
;; L O C K I N G M E C H A N I S M S
;;======================================================================
(include "megatest-fossil-hash.scm")
(include "megatest-version.scm")
;; globals
(define *writes-total-delay* 0)
(define *exit-started* #f)
(define *last-monitor-update-time* 0)
(define *tim* (iup:timer))
;; The watchdog is to keep an eye on things like db sync etc.
;;
;; TODO: for multiple areas, we will have multiple watchdogs; and multiple threads to manage
(define *watchdog* (make-thread
(lambda ()
(handle-exceptions
|
|
<
<
|
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
(include "common_records.scm")
(include "db_records.scm")
(include "key_records.scm")
(include "run_records.scm")
(include "task_records.scm")
(include "test_records.scm")
;; (include "vg_records.scm")
;;======================================================================
;; L O C K I N G M E C H A N I S M S
;;======================================================================
(include "megatest-fossil-hash.scm")
(include "megatest-version.scm")
;; globals
(define *writes-total-delay* 0)
(define *exit-started* #f)
(define *last-monitor-update-time* 0)
;; The watchdog is to keep an eye on things like db sync etc.
;;
;; TODO: for multiple areas, we will have multiple watchdogs; and multiple threads to manage
(define *watchdog* (make-thread
(lambda ()
(handle-exceptions
|