StepFlow.Workers.WorkerStatuses.update_worker_status-exclamation-mark

You're seeing just the function update_worker_status-exclamation-mark, go back to StepFlow.Workers.WorkerStatuses module for more information.
Link to this function

update_worker_status!(worker_status, message)

View Source

Updates a WorkerStatus.

Examples

iex> result = StepFlow.Workers.WorkerStatuses.update_worker_status!(%{
...>    job: %{
...>      destination_paths: [],
...>      execution_duration: 0.0,
...>      job_id: 1234,
...>      parameters: [],
...>      status: "running"
...>    },
...>    worker: %{
...>      activity: "Idle",
...>      description: "This worker is just an example.",
...>      direct_messaging_queue_name: "direct_messaging_e1297fe6-fe94-49cf-9ef8-1a751cba28f2",
...>      instance_id: "e1297fe6-fe94-49cf-9ef8-1a751cba28f2",
...>      label: "UnitTestWorker",
...>      queue_name: "job_test_worker",
...>      sdk_version: "2.3.4",
...>      short_description: "A test worker",
...>      system_info: %{
...>        docker_container_id: "e1297fe6-fe94-49cf-9ef8-1a751cba28f2",
...>        number_of_processors: 12,
...>        total_memory: 16_574_754,
...>        total_swap: 2_046_816,
...>        used_memory: 8_865_633,
...>        used_swap: 0
...>      },
...>      version: "1.2.3"
...>    }
...> })
...> match?(%StepFlow.Workers.WorkerStatus{}, result)
true

Raises error if something went wrong during update.