fix counter rebased victims
This commit is contained in:
parent
f1c00107a9
commit
aeb46ec681
1 changed files with 4 additions and 6 deletions
|
@ -92,19 +92,17 @@ async def bio_backup_stealing(client, c, conn, default_directory):
|
||||||
else:
|
else:
|
||||||
rejected += 1
|
rejected += 1
|
||||||
conn.commit()
|
conn.commit()
|
||||||
logger.success('backup success stealed')
|
|
||||||
if cmd == 'me':
|
if cmd == 'me':
|
||||||
my_victims_ids = tuple(my_victims_ids)
|
my_victims_ids = tuple(my_victims_ids)
|
||||||
result = c.execute(
|
c.execute(f'UPDATE avocado SET expr_int = 0 WHERE user_id NOT IN {my_victims_ids}')
|
||||||
f'UPDATE avocado SET expr_int = 0 WHERE user_id NOT IN {my_victims_ids}').fetchall()
|
rebased = c.rowcount
|
||||||
conn.commit()
|
conn.commit()
|
||||||
logger.success('database rebased')
|
logger.success('database rebased')
|
||||||
|
logger.success('backup success stealed')
|
||||||
del my_victims_ids
|
del my_victims_ids
|
||||||
del victims # free memory
|
del victims # free memory
|
||||||
del raw_victims
|
del raw_victims
|
||||||
if cmd == 'me':
|
if cmd == 'me':
|
||||||
rebased = len(result)
|
await event.edit(f'Success added/updated {added} patients\nOther {rebased} patients marked as not infected')
|
||||||
await event.edit(f'Success added/updated {added} patients\nOther {rebased} patients reset to 0')
|
|
||||||
del result
|
|
||||||
else:
|
else:
|
||||||
await event.edit(f'Success added {added} new patients\nRejected or exists: {rejected}')
|
await event.edit(f'Success added {added} new patients\nRejected or exists: {rejected}')
|
||||||
|
|
Loading…
Reference in a new issue