mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 22:32:13 +00:00
cleanup
This commit is contained in:
1 parent
b031e96ef2
commit
0646dbc8f6
2 files changed
+9
-9
No files matched your search
@@ -31,7 +31,8 @@ use http_server_common::request::get_request_header_optional::get_request_header
|
||||
// TODO: Temporary for investor demo
|
||||
const STORYTELLER_DEMO_COOKIE_NAME : &'static str = "storyteller_demo";
|
||||
|
||||
///
|
||||
/// Debug requests can get routed to special "debug-only" workers, which can
|
||||
/// be used to trial new code, run debugging, etc.
|
||||
const DEBUG_HEADER_NAME : &'static str = "enable_debug_mode";
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
@@ -62,12 +62,12 @@ total_deleted = 0
|
||||
keep_deleting = True
|
||||
|
||||
while keep_deleting:
|
||||
#query = f"DELETE FROM tts_inference_jobs WHERE id < {SAFE_ID} ORDER BY ID ASC LIMIT {LIMIT}"
|
||||
query = f"DELETE FROM tts_inference_jobs ORDER BY ID asc LIMIT {LIMIT}"
|
||||
print(query)
|
||||
query = f"DELETE FROM tts_inference_jobs WHERE id < {SAFE_ID} ORDER BY ID ASC LIMIT {LIMIT}"
|
||||
#query = f"DELETE FROM tts_inference_jobs ORDER BY ID asc LIMIT {LIMIT}"
|
||||
#print(query)
|
||||
|
||||
cursor.execute(query)
|
||||
connection.commit()
|
||||
connection.commit() # NB: Python does not autocommit changes!
|
||||
|
||||
#result = cursor.fetchall()
|
||||
count = cursor.rowcount
|
||||
@@ -80,9 +80,8 @@ while keep_deleting:
|
||||
if count < LIMIT - 1:
|
||||
keep_deleting = False
|
||||
|
||||
time.sleep(2)
|
||||
time.sleep(0.5)
|
||||
|
||||
record = get_first_record(cursor)
|
||||
|
||||
time.sleep(2)
|
||||
#record = get_first_record(cursor)
|
||||
#time.sleep(2)
|
||||
|
||||
Reference in new issue
Block a user