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 & retries

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

Go SDK: NewTimer function for durable timers

In Go, use the workflow.NewTimer() function to set a durable timer in a workflow. Pass a duration as the second parameter: timer := workflow.NewTimer(timerCtx, duration).

Go SDK: Sleep function for durable timers

In Go, use the workflow.Sleep() function to set a sleep duration in a workflow. Pass a context as the first parameter and a duration as the second parameter: sleep = workflow.Sleep(ctx, 10*time.Second). A zero or negative sleep duration causes the function to return immediately.

Durable timers persist through Worker and Service downtime

Timers in Temporal are persisted, so if a Worker or Temporal Service is down when the timer completes, the timer will resolve and code will continue executing as soon as the Worker and Service are back up.

Timers are resource-light and scalable

Sleeping with timers is a resource-light operation that does not tie up the process. A single Worker can run millions of timers simultaneously.

Durable timers can span long durations

A workflow can set a durable timer to sleep for days, months, or even years.

Give your agent this brain