Skip to content

Commit

Permalink
feat(workers): add activate/deactivate (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
justprosh committed Nov 27, 2023
1 parent e0c0d95 commit 401621a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions workers.aqua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 401621a

Please sign in to comment.