mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
修改端口自动放行端口
This commit is contained in:
@@ -15,7 +15,7 @@ func GetWorkflowCount() (map[string]any, error) {
|
||||
s.Connect()
|
||||
defer s.Close()
|
||||
workflow, err := s.Query(`select count(*) as count,
|
||||
count(case when active=1 then 1 end ) as active,
|
||||
count(case when exec_type='auto' then 1 end ) as active,
|
||||
count(case when last_run_status='fail' then 1 end ) as failure
|
||||
from workflow
|
||||
`)
|
||||
@@ -126,7 +126,7 @@ func GetWorkflowHistory() ([]map[string]any, error) {
|
||||
} else {
|
||||
name = "未知"
|
||||
}
|
||||
|
||||
|
||||
result = append(result, map[string]any{
|
||||
"name": name,
|
||||
"state": state,
|
||||
|
||||
@@ -93,37 +93,3 @@ func (s *Scheduler) loop() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// package scheduler
|
||||
//
|
||||
// import (
|
||||
// "sync"
|
||||
// "time"
|
||||
// )
|
||||
//
|
||||
// var funcs = []func(){
|
||||
// SiteMonitor,
|
||||
// RunWorkflows,
|
||||
// }
|
||||
//
|
||||
// func Scheduler() {
|
||||
// for {
|
||||
// start := time.Now()
|
||||
//
|
||||
// var wg sync.WaitGroup
|
||||
// wg.Add(len(funcs))
|
||||
//
|
||||
// for _, f := range funcs {
|
||||
// go func(fn func()) {
|
||||
// defer wg.Done()
|
||||
// fn()
|
||||
// }(f)
|
||||
// }
|
||||
// wg.Wait()
|
||||
// // 保证每轮间隔至少10秒
|
||||
// elapsed := time.Since(start)
|
||||
// if elapsed < 10*time.Second {
|
||||
// time.Sleep(10*time.Second - elapsed)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user