"bot_instance": "https://example.com",
"bot_token": "",
"bot_visibility": "unlisted",
- "slogan": "### Your footer slogan ###"
+ "slogan": "### Your footer slogan ###",
+ "recheck_instance": 3600
}
print("--- Adding new instance:", domain)
try:
c.execute(
- "INSERT INTO instances SELECT ?, ?, ?, ?",
+ "INSERT INTO instances SELECT ?, ?, ?, NULL",
(
domain,
get_hash(domain),
- determine_software(domain),
- time.time()
+ determine_software(domain)
),
)
import sqlite3
import sys
import json
+import time
import fba
def fetch_instances(domain: str):
# Loop through some instances
fba.c.execute(
- "SELECT domain FROM instances WHERE software IS NOT NULL ORDER BY rowid DESC"
+ "SELECT domain FROM instances WHERE software IS NOT NULL AND (last_access IS NULL OR last_access < ?) ORDER BY rowid DESC", [time.time() - fba.config["recheck_instance"]]
)
for instance in fba.c.fetchall():