755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
|
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
|
-
+
+
|
(lambda ()
(print "SERVER STARTED: "host":"port" AT "(current-seconds)" server-id: "serv-id" pid: "(current-process-id)" dbfname: "dbfname)))
(let loop ((count 0))
(if (not (file-exists? servinf))
(begin
(debug:print 0 *default-log-port* "WARNING: file "servinf" was created but it doesn't show up on disk! We'll try again.")
(thread-sleep! 1)
(if (< count 10)
(if (> count 10)
(debug:print 0 *default-log-port* "WARNING: file "servinf" was not created.")
(loop (+ count 1))))))
serv-id))
;; find valid server
;; get servers listed, last part of name must match :<dbfname>
;; if more than one, wait one second and look again
;; future: ping oldest, if alive remove other :<dbfname> files
|