You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❌ Never use `time.Now()` - returns different values during replay.
214
-
✅ Use `restate.Now()`- Restate records and replays the same timestamp.
224
+
✅ Wrap `time.Now()`in `restate.Run` to let Restate record the timestamp.
215
225
216
226
### Durable Timers and Sleep
217
227
@@ -276,16 +286,19 @@ if err != nil {
276
286
277
287
## Concurrency
278
288
279
-
Always use Restate combinators (`restate.Select`) instead of Go's native goroutines and channels - they journal execution order for deterministic replay.
289
+
Always use Restate `Wait*` functions instead of Go's native goroutines and channels - they journal execution order for deterministic replay.
❌ Never use `time.Now()` - returns different values during replay.
214
-
✅ Use `restate.Now()`- Restate records and replays the same timestamp.
224
+
✅ Wrap `time.Now()`in `restate.Run` to let Restate record the timestamp.
215
225
216
226
### Durable Timers and Sleep
217
227
@@ -276,16 +286,19 @@ if err != nil {
276
286
277
287
## Concurrency
278
288
279
-
Always use Restate combinators (`restate.Select`) instead of Go's native goroutines and channels - they journal execution order for deterministic replay.
289
+
Always use Restate `Wait*` functions instead of Go's native goroutines and channels - they journal execution order for deterministic replay.
0 commit comments