Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 647d5afd authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

Pass the store connection as a state property.

* guix-jupyter-kernel.scm (%store-property): New variable.
(proxy-state-store): New procedure.
(reply-execute-request): Use it instead of using 'with-store'.
(kernel): Use 'with-store' and pass the store as a state property.
parent 6d550be4
......@@ -56,6 +56,13 @@
(define container-context (zmq-create-context))
(define %store-property
;; Key used to access the <store-connection> in <proxy-state>.
(list 'store 'property))
(define (proxy-state-store state)
"Return the <store-connection> associated with STATE."
(proxy-state-property state %store-property))
;;
;; HTML.
......@@ -115,10 +122,10 @@
(format/log "spawning container ~s~%" name)
(let* ((manifest (specifications->manifest (force %inferior)
specs))
(container (with-store store ;FIXME: not nice
(run-with-store store
(start-container container-context
name manifest))))
(store (proxy-state-store state))
(container (run-with-store store
(start-container container-context
name manifest)))
(state (register-proxied name container state)))
(monitor-client container)
(pub-idle kernel message)
......@@ -293,6 +300,8 @@ that container."
(manifest '())))))
(state (register-proxied "default" sub-kernel
(proxy-state kernel))))
(serve-kernels (list kernel sub-kernel)
(proxy-request-handler dispatch-route)
state)))
(with-store store
(serve-kernels (list kernel sub-kernel)
(proxy-request-handler dispatch-route)
(set-proxy-state-property state
%store-property store)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment