every -loop duration, look for completed tasks with loop set and incomplete them

This commit is contained in:
Bel LaPointe
2021-07-17 11:04:52 -06:00
parent 81c8743de7
commit b8f0efc01c
3 changed files with 44 additions and 0 deletions

View File

@@ -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()
}