diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-25 16:26:34 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-25 16:26:34 +0100 |
| commit | 443286aabc9d9e433625e0dd99e678754bbc74e5 (patch) | |
| tree | 1d9011757dcd593cc082fd338732173d3117cf2c /common/timer.go | |
| parent | dd5a4c1766ed9cadcd5de982f91f407adbd07f40 (diff) | |
fix(reducer): double call on startup
Diffstat (limited to 'common/timer.go')
| -rw-r--r-- | common/timer.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/timer.go b/common/timer.go index 553a8fd..aaea326 100644 --- a/common/timer.go +++ b/common/timer.go @@ -9,8 +9,7 @@ import ( func NewTimer(ctx context.Context, d time.Duration, fn func(context.Context, context.CancelFunc)) context.CancelFunc { ctx, cancel := context.WithCancel(ctx) - logger := bot.Logger(ctx).With("module", "timer") - ctx = bot.SetLogger(ctx, logger) + ctx = bot.SetLogger(ctx, bot.Logger(ctx).With("module", "timer")) go func(ctx context.Context, d time.Duration) { ticker := time.NewTicker(d) fn(ctx, cancel) |
