Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

takeOrders

takeOrders(builder, takeOrdersOptions?): RoutinesBuilder

Adds what a worker’s routines need to take orders to builder, and returns it for start: the order walks the worker stage by stage, and its end goes back to the routine and step it interrupted. While the worker holds an order its routine hears no event of its own: end the order with endOrder, then send the event.

Parameter Type
builder RoutinesBuilder
takeOrdersOptions TakeOrdersOptions

RoutinesBuilder

const hand = takeOrders(routines("hand").routine("home", (r) => r.walk(home).wait(3)), { reach: 0.6 }).start("home");