Overview
Comment: | Compiles! |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v2.0001 |
Files: | files | file ages | folders |
SHA1: |
0c8311b49bc9d74febc51c47d3328325 |
User & Date: | matt on 2021-12-29 08:18:35 |
Other Links: | branch diff | manifest | tags |
Context
2021-12-29
| ||
14:43 | misc build stuff check-in: ecd6337e3d user: mrwellan tags: v2.0001 | |
08:18 | Compiles! check-in: 0c8311b49b user: matt tags: v2.0001 | |
2021-12-28
| ||
20:01 | Moved server shutdown stuff to on-exit check-in: 696298f9a4 user: matt tags: v2.0001 | |
Changes
Modified Makefile from [89e357068d] to [86b2762cd0].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | # all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard all : $(PREFIX)/bin/.$(ARCHSTR) mtest # add dboard mtut and tcmt back later # module source files MSRCFILES = autoload.scm dbi.scm ducttape-lib.scm pkts.scm stml2.scm \ |
︙ |
Modified megatest.scm from [c1c08ee586] to [b00e0e6122].
︙ | |||
503 504 505 506 507 508 509 | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | - - - - - + + + + + | Version " megatest-version ", built from " megatest-fossil-hash )) (define (main) (make-and-init-bigdata) ;; set up the functions in http transport |
︙ |
Modified rmtmod.scm from [1d5816da28] to [5121329d22].
︙ | |||
126 127 128 129 130 131 132 133 134 135 136 137 138 139 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | + + | (port #f) (uuid #f) (rep #f) (dbfile #f) (api-url #f) (api-uri #f) (api-req #f) (uconn #f) (mode #f) (status 'starting) (trynum 0) ;; count the number of ports we've tried ) (define (servdat->url sdat) (conc (servdat-host sdat)":"(servdat-port sdat))) |
︙ | |||
177 178 179 180 181 182 183 184 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | + + + - + | ;; -> http://abc.com:900/<entrypoint> ;; (define (conndat->uri conn entrypoint) (conc "http://"(conndat-ipaddr conn)":"(conndat-port conn)"/"entrypoint)) ;; set up the api proc, seems like there should be a better place for this? ;; ;; IS THIS NEEDED ANYMORE? TODO - REMOVE IF POSSIBLE ;; (define api-proc (make-parameter conc)) |
︙ | |||
229 230 231 232 233 234 235 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + - - + + | (assert (< count 30) "FATAL: responder failed to initialize in rmt:open-main-connection") (if (not *server-info*) (begin (thread-sleep! 1) (loop)) (begin (servdat-mode-set! *server-info* 'non-db) |
︙ | |||
268 269 270 271 272 273 274 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + | (fullpath (db:dbname->path apath dbname)) (new-the-srv (make-conndat apath: apath dbname: dbname fullname: fullpath hostport: srv-addr |
︙ | |||
298 299 300 301 302 303 304 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | - + | (debug:print-logger rmt:log-to-main))) (cond ((or (not mconn) ;; no channel open to main? (< (conndat-expires mconn)(+ (current-seconds) 2))) ;; restablish connection if less than 2 seconds on the lease (if mconn ;; previously opened - clean up NB// consolidate this with the similar code in open main above (begin (debug:print-info 0 *default-log-port* "Clearing out connection to main that has expired.") |
︙ | |||
330 331 332 333 334 335 336 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | - + | (debug:print-info 0 *default-log-port* "got "res) (hash-table-set! conns fullname (make-conndat apath: apath dbname: dbname hostport: (conc host":"port) |
︙ | |||
363 364 365 366 367 368 369 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | + - + | (let* ((apath *toppath*) (remdat *remotedat*) (conns (remotedat-conns remdat)) ;; just checking that remdat is a remotedat (dbname (db:run-id->dbname rid))) (if *localmode* (let* ((dbdat (dbr:dbstruct-get-dbdat *dbstruct* dbname)) (indat `((cmd . ,cmd)(params . ,params)))) (api:execute-requests *dbstruct* cmd params) |
︙ | |||
392 393 394 395 396 397 398 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | - + - | (let* ((soc (conndat-socket conn)) (key #f) (host (conndat-ipaddr conn)) (port (conndat-port conn)) (payload `((cmd . ,cmd) (key . ,(conndat-srvkey conn)) (params . ,params))) |
︙ | |||
1656 1657 1658 1659 1660 1661 1662 | 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 | - + | ;; ;; conn is a conndat record ;; (define (server:ping conn #!key (do-exit #f)) (let* ((req (conndat-socket conn)) (srvkey (conndat-srvkey conn)) (msg (sexpr->string '(ping ,srvkey)))) |
︙ | |||
1688 1689 1690 1691 1692 1693 1694 | 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 | - + - - - + + + | (if *server-info* (let* ((uconn (servdat-uconn *server-info*))) (wait-and-close uconn)) (let* ((port (portlogger:open-run-close portlogger:find-port)) (handler-proc (lambda (rem-host-port qrykey cmd params) ;; (api:execute-requests *dbstruct-db* cmd params)))) ;; (api:process-request *dbstuct-db* |
︙ | |||
1830 1831 1832 1833 1834 1835 1836 | 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 | - + | (conc (alist-ref 'host srv-pkt) ":" (alist-ref 'port srv-pkt))) (define (server-ready? host port key) ;; server-address is host:port (let* ((data (sexpr->string `((cmd . ping) (key . ,key) (params . ())))) |
︙ | |||
2268 2269 2270 2271 2272 2273 2274 | 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 | - + - + - + | (if (string-search (regexp (conc ":" port-num)) inl) (begin ;(print "Output: " inl) (set! ret #t)) (loop (read-line inp))))))) ret)) |
︙ | |||
2318 2319 2320 2321 2322 2323 2324 | 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | - + | ;; (thread-terminate! th1)) ;; "timer thread"))) ;; (thread-start! th1) ;; (thread-start! th2) ;; (thread-join! th1) ;; res)))) ;; |
︙ |