refactor(scheduler): add base context for graceful shutdown

- Create application-level context with cancel function
- Pass base context to scheduler via WithBaseContext option
- Move scheduler.Stop() to explicit shutdown sequence after context cancellation
- Upgrade foundation dependency to v0.7.0 for new scheduler options
This commit is contained in:
zenfun
2026-01-01 01:44:49 +08:00
parent 31914b9ab5
commit bae3d9bd5b
3 changed files with 12 additions and 5 deletions

2
go.mod
View File

@@ -4,7 +4,7 @@ go 1.24.5
require (
github.com/alicebob/miniredis/v2 v2.35.0
github.com/ez-api/foundation v0.6.0
github.com/ez-api/foundation v0.7.0
github.com/gin-gonic/gin v1.11.0
github.com/pelletier/go-toml/v2 v2.2.4
github.com/redis/go-redis/v9 v9.17.2