simplify task package implementation

This commit is contained in:
yusing
2025-01-01 06:07:32 +08:00
parent e7aaa95ec5
commit 1ab34ed46f
35 changed files with 547 additions and 600 deletions

View File

@@ -153,8 +153,8 @@ func (p *Provider) ScheduleRenewal() {
return
}
go func() {
task := task.GlobalTask("cert renew scheduler")
defer task.Finish("cert renew scheduler stopped")
task := task.RootTask("cert-renew-scheduler", true)
defer task.Finish(nil)
for {
renewalTime := p.ShouldRenewOn()