Compare commits

..

2 Commits

@ -17,4 +17,4 @@ up: deps .backend.lock
@nohup $(GUILE) ./main.scm > yacswa-backend.log & export PID=$$! & echo "Server spawned with PID $${PID}"; echo $${PID} > .backend.lock; unset PID
down:
@export PID=`cat .backend.lock`; kill -15 $${PID}; rm .backend.lock; rm bc; echo "Server on PID $${PID} down."; unset PID
@export PID=`cat .backend.lock`; kill -15 $${PID}; rm .backend.lock; echo "Server on PID $${PID} down."; unset PID

@ -122,6 +122,9 @@
(sleep (sec/mins 9))))
(loop)))
#! As the git repository is no longer updated there is no need to
establish a job loop or populate the statistics tables asynchronously
(begin-thread (with-mutex %json-lock
(git:fetch)
(set! mcron-locked (mutex-owner %json-lock))
@ -129,6 +132,13 @@
(calculate-strings!))
(sleep (next-timestamp))
(job-loop))
(sleep 1)
(while (mutex-locked? %json-lock)
(sleep 1))
!#
; Functional parts of the asynchronous code above
(git:fetch)
(process-stats! $stat-tree)
(calculate-strings!)

@ -8,9 +8,10 @@
;; :
;; Backchannel
#!
(define repl-sock (make-unix-domain-server-socket #:path "./bc"))
(spawn-server repl-sock)
!#
;; endpoint helpers
(define (err: text) (scm->json-string `((error . ,text))))

Loading…
Cancel
Save