every -loop duration, look for completed tasks with loop set and incomplete them
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"local/args"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -15,6 +16,7 @@ var (
|
||||
StorePass string
|
||||
Root string
|
||||
OAuth string
|
||||
Loop time.Duration
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -34,6 +36,7 @@ func Refresh() {
|
||||
as.Append(args.STRING, "storepass", "pass of store", "")
|
||||
as.Append(args.STRING, "oauth", "url for boauthz", "")
|
||||
as.Append(args.STRING, "root", "root of static files", "./public")
|
||||
as.Append(args.DURATION, "loop", "loop duration for refreshing completed tasks", time.Minute)
|
||||
if err := as.Parse(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -44,5 +47,6 @@ func Refresh() {
|
||||
StoreUser = as.Get("storeuser").GetString()
|
||||
StorePass = as.Get("storepass").GetString()
|
||||
Root = as.Get("root").GetString()
|
||||
Loop = as.Get("loop").GetDuration()
|
||||
OAuth = as.Get("oauth").GetString()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user