mirror of
https://github.com/fluencelabs/aqua-lib
synced 2024-12-04 15:20:23 +00:00
feat(workers): add activate/deactivate (#65)
This commit is contained in:
parent
e0c0d953f6
commit
401621a389
14
workers.aqua
14
workers.aqua
@ -17,3 +17,17 @@ service Worker("worker"):
|
|||||||
|
|
||||||
-- Returns list of all workers.
|
-- Returns list of all workers.
|
||||||
list() -> []PeerId
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user