mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-07 02:20:24 +08:00
多个API节点时选择一个作为主节点/优化任务相关代码
This commit is contained in:
@@ -6,13 +6,14 @@ import (
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestSSLCertUpdateOCSPTask_Loop(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
|
||||
var task = tasks.NewSSLCertUpdateOCSPTask()
|
||||
err := task.Loop(false)
|
||||
var task = tasks.NewSSLCertUpdateOCSPTask(1 * time.Minute)
|
||||
err := task.Loop()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user