Skip to main content

init_worker

Function init_worker 

Source
pub fn init_worker(
    runtime: &CoreRuntime,
    worker_config: WorkerConfig,
    connection: Connection,
) -> Result<Worker, Error>
Expand description

Initialize a worker bound to a task queue.

You will need to have already initialized a CoreRuntime which will be used for this worker. After the worker is initialized, you should use CoreRuntime::tokio_handle to run the worker’s async functions.

Lang implementations must pass in a Client When they do so, this function will always overwrite the client retry configuration, force the client to use the namespace defined in the worker config, and set the client identity appropriately.