new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Temporal · all subjects

timers & workflows

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Durable Timer definition and purpose

A Durable Timer is used to pause the execution of a Workflow for a specified duration. Workflows can sleep for days or even months.

Durable Timers are resource-efficient

Sleeping is a resource-light operation that does not tie up the process. Millions of Timers can be run off a single Worker.

Workflow.DelayAsync for timers in .NET SDK

To add a Timer in a Workflow using the .NET SDK, use Workflow.DelayAsync. This is a deterministic form of Task.Delay.

Workflow.DelayAsync example

await Workflow.DelayAsync(TimeSpan.FromDays(3));

WorkflowExecutionTimedOut event indicates timeout

WorkflowExecutionTimedOut event indicates that the Workflow Execution has timed out by the Temporal Server due to the Workflow not being completed within timeout settings. It has fields: retry_state (Reason provided for whether Task should or shouldn't be retried), new_execution_run_id (Run Id of new Workflow started by Cron or Retry).

WorkflowTaskTimedOut event indicates task timeout

WorkflowTaskTimedOut event indicates that the Workflow Task encountered a timeout. Either an SDK client with a local cache was not available at the time, or it took too long for the SDK client to process the Task. It has fields: scheduled_event_id (Id of WorkflowTaskScheduled Event this Workflow Task corresponds to), started_event_id (Id of WorkflowTaskStarted Event this Task corresponds to), timeout_type (Type of timeout that has occurred).

TimerFired event indicates timer fired

TimerFired event indicates a timer has fired. It has fields: timer_id (Id assigned for timer by Worker or user), started_event_id (Id of TimerStarted Event itself).

TimerCanceled event indicates timer canceled

TimerCanceled event indicates a Timer has been canceled. It has fields: timer_id (Id assigned for timer by Worker or user), started_event_id (Id of TimerStarted Event itself), workflow_task_completed_event_id (Id of WorkflowTaskCompleted Event reported with).

Give your agent this brain