From 401621a38930c8166984ecbf03edede451fe9487 Mon Sep 17 00:00:00 2001 From: Aleksey Proshutinskiy Date: Mon, 27 Nov 2023 20:34:22 +0200 Subject: [PATCH] feat(workers): add activate/deactivate (#65) --- workers.aqua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/workers.aqua b/workers.aqua index 8c379b6..610fcc1 100644 --- a/workers.aqua +++ b/workers.aqua @@ -17,3 +17,17 @@ service Worker("worker"): -- Returns list of all workers. list() -> []PeerId + + -- Restarts worker installation spell. + -- Can be called only by system spells or peer manager, + -- Throws an error if worker doesn't exist. + activate(deal_id: string) + + -- Stops all worker spells and drops all incoming particles until activation. + -- Can be called only by system spells or peer manager, + -- Throws an error if worker doesn't exist. + deactivate(deal_id: string) + + -- Returns true if worker is active. + -- Throws an error if worker doesn't exist. + is_active(deal_id: string) -> bool