pub async fn run_task_from_worker_ctx<T>(
worker_context: WorkerContext,
) -> Result<(), String>where
T: TaskHandler,Expand description
Internal function to execute a task handler from a worker context.
This function:
- Deserializes the job payload into the specified task handler type
- Calls the task handler’s run method
- Processes the result
§Arguments
worker_context- The context containing job information and payload
§Returns
Result<(), String>- Ok(()) on success, Err with error message on failure
§Type Parameters
T- The task handler type to deserialize and execute