Megatest

Diff
Login

Differences From Artifact [fcc299d5de]:

To Artifact [e17aad21de]:


317
318
319
320
321
322
323
324

325
326

327
328
329
330
331
332
333
317
318
319
320
321
322
323

324
325

326
327
328
329
330
331
332
333







-
+

-
+








(define (server:get-client-signature) ;; BB> why is this proc named "get-"?  it returns nothing -- set! has not return value.
  (if *my-client-signature* *my-client-signature*
      (let ((sig (server:mk-signature)))
        (set! *my-client-signature* sig)
        *my-client-signature*)))

;; wait for server=start-last to be three seconds old - this might be what was causing the obfusc-skel fails
;; wait for server=start-last to be three seconds old
;;
#;(define (server:wait-for-server-start-last-flag areapath)
(define (server:wait-for-server-start-last-flag areapath)
  (let* ((start-flag (conc areapath "/logs/server-start-last"))
	 ;;; THIS INTERACTS WITH [server] timeout. Suggest using 0.1 or above for timeout (6 seconds)
	 (reftime    (configf:lookup-number *configdat* "server" "idletime" default: 4))
	 (server-key (conc (get-host-name) "-" (current-process-id))))
    (if (file-exists? start-flag)
	(let* ((fmodtime (file-modification-time start-flag))
	       (delta    (- (current-seconds) fmodtime))
345
346
347
348
349
350
351
352

353
354

355
356
357
358
359
360
361
345
346
347
348
349
350
351

352
353

354
355
356
357
358
359
360
361







-
+

-
+







	      #t ;; (system (conc "touch " start-flag)) ;; lazy but safe
	      (begin
		(debug:print-info 0 *default-log-port* "Gating server start, last start: "
				  fmodtime ", delta: " delta ", reftime: " reftime ", all-go=" all-go)
		(thread-sleep! reftime)
		(server:wait-for-server-start-last-flag areapath)))))))

;; wait for server=start-last to be three seconds old
;; wait for server=start-last to be three seconds old - this might be what was causing the obfusc-skel fails
;;
(define (server:wait-for-server-start-last-flag areapath)
#;(define (server:wait-for-server-start-last-flag areapath)
  (let* ((start-flag (conc areapath "/logs/server-start-last")))
    (if (file-exists? start-flag)
	(let* ((fmodtime (file-modification-time start-flag))
	       (reftime  (+ 2 (random 3)))
	       (delta    (- (current-seconds) fmodtime))
	       (all-go   (> delta reftime)))
	  (if all-go