Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
saniksin committed Jan 14, 2024
1 parent f259a58 commit 5c275b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ async def main():

logger.info('Текущее время перед обновлением комиссии! Ухожу на сон до 180 секунд')
if current_time[-2:] == "59":
sleep_time = 180
sleep_time = 210
elif current_time[-2:] == "00":
sleep_time = 120
sleep_time = 150
else:
sleep_time = 60
sleep_time = 90

for _ in tqdm(range(sleep_time), desc="СОН: "):
time.sleep(1)
Expand Down Expand Up @@ -184,9 +184,9 @@ async def main():


if __name__ == '__main__':
#try:
create_files()
set_windows_event_loop_policy()
asyncio.run(main())
# except (KeyboardInterrupt, TypeError):
# logger.info('\n\nПрограмма успешно завершена')
try:
create_files()
set_windows_event_loop_policy()
asyncio.run(main())
except (KeyboardInterrupt, TypeError):
logger.info('\n\nПрограмма успешно завершена')
4 changes: 2 additions & 2 deletions tasks/gate_whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def start_add_whitelisted_task(self):
current_otp = str(totp.now())

result = await self.gate_wl_request(auth_code=current_otp)
if result == {'result': False} and result['msg'] in ['Слишком много попыток', 'Too many attempts']:
if result['result'] == False and result['msg'] in ['Слишком много попыток', 'Too many attempts']:
sleep_time = 400
logger.info(f'{self.get_addr()}{result["msg"]}')
for _ in tqdm(range(sleep_time), desc="СОН: "):
Expand Down Expand Up @@ -184,7 +184,7 @@ async def start_add_whitelisted_one_by_one_task(self):

result = await self.gate_wl_for_one_request(auth_code=current_otp)

if result == {'result': False} and result['msg'] in ['Слишком много попыток', 'Too many attempts']:
if result['result'] == False and result['msg'] in ['Слишком много попыток', 'Too many attempts']:
sleep_time = 400
logger.info(f'{self.data.address} | слишком много попыток')
for _ in tqdm(range(sleep_time), desc="СОН: "):
Expand Down
6 changes: 3 additions & 3 deletions tasks/gate_withdraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ async def check_current_time():
if current_time[-2:] in ["59", "00", "01"]:

if current_time[-2:] == "59":
sleep_time = 180
sleep_time = 210
elif current_time[-2:] == "00":
sleep_time = 120
sleep_time = 150
else:
sleep_time = 60
sleep_time = 90

GateWithdraw.need_update = True

Expand Down

0 comments on commit 5c275b2

Please sign in to comment.