2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
|
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
(loop (car tal)(cdr tal)))))))
;; no match, try again
(if (null? tal)
fallback-launcher
(loop (car tal)(cdr tal))))))))
fallback-launcher)))
;;======================================================================
;; NMSG AND NEW API
;;======================================================================
;;
;; ;;======================================================================
;; ;; nm based server experiment, keep around for now.
;; ;;
;; (define (nm:start-server dbconn #!key (given-host-name #f))
;; (let* ((srvdat (start-raw-server given-host-name: given-host-name))
;; (host-name (srvdat-host srvdat))
;; (soc (srvdat-soc srvdat)))
;;
;; ;; start the queue processor (save for second round of development)
;; ;;
;; (thread-start! (make-thread! (lambda ()(queue-processor dbconn) "Queue processor")))
;; ;; msg is an alist
;; ;; 'r host:port <== where to return the data
;; ;; 'p params <== data to apply the command to
;; ;; 'e j|s|l <== encoding of the params. default is s (sexp), if not specified is assumed to be default
;; ;; 'c command <== look up the function to call using this key
;; ;;
;; (let loop ((msg-in (nn-recv soc)))
;; (if (not (equal? msg-in "quit"))
;; (let* ((dat (decode msg-in))
;; (host-port (alist-ref 'r dat)) ;; this is for the reverse req rep where the server is a client of the original client
;; (params (alist-ref 'p dat))
;; (command (let ((c (alist-ref 'c dat)))(if c (string->symbol c) #f)))
;; (all-good (and host-port params command (hash-table-exists? *commands* command))))
;; (if all-good
;; (let ((cmddat (make-qitem
;; command: command
;; host-port: host-port
;; params: params)))
;; (queue-push cmddat) ;; put request into the queue
;; (nn-send soc "queued")) ;; reply with "queued"
;; (print "ERROR: ["(common:human-time)"] BAD request " dat))
;; (loop (nn-recv soc)))))
;; (nn-close soc)))
;;======================================================================
;; D A S H B O A R D U S E R V I E W S
;;======================================================================
;;======================================================================
;; first read ~/views.config if it exists, then read $MTRAH/views.config if it exists
;;
|