FileSessionLeaseStore constructor
FileSessionLeaseStore({
- required ExecutionEnv env,
- DateTime now()?,
- Duration staleAfter = const Duration(seconds: 15),
Creates the store. now and staleAfter are injectable for tests;
the heartbeat cadence lives with the owners (CLI ~4s on the inbox
tick, app 5s timer) — the store only judges staleness.
Implementation
FileSessionLeaseStore({
required ExecutionEnv env,
DateTime Function()? now,
this.staleAfter = const Duration(seconds: 15),
}) : _env = env,
_now = now ?? DateTime.now;