83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
;;======================================================================
;; Server and client management
;;======================================================================
;; state: 'live, 'shutting-down, 'dead
(define (tasks:server-register mdb pid interface port priority state)
(sqlite3:execute
mdb
"INSERT OR REPLACE INTO servers (pid,hostname,port,start_time,priority,state,mt_version,heartbeat,interface)
VALUES(?, ?, ?, strftime('%s','now'), ?, ?, ?, strftime('%s','now'),?);"
pid (get-host-name) port priority (conc state) megatest-version interface)
(list
(tasks:server-get-server-id mdb (get-host-name) interface port pid)
|
>
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
;;======================================================================
;; Server and client management
;;======================================================================
;; state: 'live, 'shutting-down, 'dead
(define (tasks:server-register mdb pid interface port priority state)
(debug:print-info 11 "tasks:server-register " pid " " interface " " port " " priority " " state)
(sqlite3:execute
mdb
"INSERT OR REPLACE INTO servers (pid,hostname,port,start_time,priority,state,mt_version,heartbeat,interface)
VALUES(?, ?, ?, strftime('%s','now'), ?, ?, ?, strftime('%s','now'),?);"
pid (get-host-name) port priority (conc state) megatest-version interface)
(list
(tasks:server-get-server-id mdb (get-host-name) interface port pid)
|