aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <>2021-08-01 21:42:19 -0700
committerFChannel <>2021-08-01 21:42:19 -0700
commiteffb65f2d7321d267d444d4231c1aae245e3f619 (patch)
tree500b275ddfee0346bce0a7750395e5eb0ce2e494 /main.go
parent4450e8da252137b68f067dbc9cfaa5745a8804c5 (diff)
changed inactive time limit to 48hrs checks every 24
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 07d2adf..dd9b9d0 100644
--- a/main.go
+++ b/main.go
@@ -2946,7 +2946,7 @@ func StartupArchive(db *sql.DB) {
func CheckInactive(db *sql.DB) {
for true {
CheckInactiveInstances(db)
- time.Sleep(48 * time.Hour)
+ time.Sleep(24 * time.Hour)
}
}
@@ -2976,9 +2976,10 @@ func CheckInactiveInstances(db *sql.DB) map[string]string {
instances[instance] = instance
}
+ re := regexp.MustCompile(Domain + `(.+)?`)
for _, e := range instances {
actor := GetActor(e)
- if actor.Id == "" {
+ if actor.Id == "" && !re.MatchString(e) {
AddInstanceToInactiveDB(db, e)
} else {
DeleteInstanceFromInactiveDB(db, e)