mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-17 07:04:36 +00:00
delete by status
This commit is contained in:
1 parent
0646dbc8f6
commit
a622e7a9e8
1 file changed
+3
-2
@@ -48,7 +48,8 @@ LIMIT = 100000
|
||||
#
|
||||
##total_count = get_record_count()
|
||||
|
||||
total_count = 75082057
|
||||
#total_count = 75082057
|
||||
total_count = 21925602
|
||||
|
||||
def get_first_record(cursor):
|
||||
query = f"select * from tts_inference_jobs order by id limit 1"
|
||||
@@ -63,7 +64,7 @@ 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}"
|
||||
query = f"DELETE FROM tts_inference_jobs WHERE status = 'complete_success' ORDER BY ID ASC LIMIT {LIMIT}"
|
||||
#print(query)
|
||||
|
||||
cursor.execute(query)
|
||||
|
||||
Reference in new issue
Block a user