diff --git a/run_service_backend.py b/run_service_backend.py index 2d9ae71..7fbd198 100644 --- a/run_service_backend.py +++ b/run_service_backend.py @@ -110,12 +110,14 @@ def data_retrieve_thread(): def skland_sign_in_thread(): try: last_run = None + next_run_time = random_time(480, 720) while 1: if not ark_back.is_retrieving_data: break time.sleep(20) now = datetime.datetime.now() - if now.strftime('%H:%M') == random_time(480, 720) and last_run != now.date(): + if now.strftime('%H:%M') == next_run_time and last_run != now.date(): + next_run_time = random_time(480, 720) ark_back.skland_sign_new() last_run = now.date() except Exception as e: @@ -127,7 +129,6 @@ def skland_sign_in_thread(): if __name__ == '__main__': - send_batch_email(['2654988228@qq.com'], 'test mail', 'test111') print('start') logger = LoggerClass().get_log(logging.INFO) ark_back = ArkHelperBackend(logger=logger)