let refresh ignore maxbot is paused, force to send refresh.

master
Your Name 2024-08-29 11:48:23 +08:00
parent 75843b5f00
commit 312a26b84e
2 changed files with 6 additions and 10 deletions

View File

@ -10881,7 +10881,6 @@ def main(args):
else:
print("Load config error!")
# internal variable. 說明:這是一個內部變數,請略過。
url = ""
last_url = ""
@ -10927,6 +10926,9 @@ def main(args):
if len(url) == 0:
continue
if not is_refresh_datetime_sent:
is_refresh_datetime_sent = check_refresh_datetime_occur(driver, config_dict["refresh_datetime"])
is_maxbot_paused = False
if os.path.exists(CONST_MAXBOT_INT28_FILE):
is_maxbot_paused = True
@ -10952,9 +10954,6 @@ def main(args):
driver = reset_webdriver(driver, config_dict, url)
maxbot_last_reset_time = time.time()
if not is_refresh_datetime_sent:
is_refresh_datetime_sent = check_refresh_datetime_occur(driver, config_dict["refresh_datetime"])
tixcraft_family = False
if 'tixcraft.com' in url:
tixcraft_family = True

View File

@ -2152,7 +2152,6 @@ def nodriver_overwrite_prefs(conf):
with open(state_filepath, 'w') as outfile:
outfile.write(json_str)
async def check_refresh_datetime_occur(tab, target_time):
is_refresh_datetime_sent = False
@ -2168,7 +2167,6 @@ async def check_refresh_datetime_occur(tab, target_time):
return is_refresh_datetime_sent
async def main(args):
config_dict = get_config_dict(args)
@ -2195,7 +2193,6 @@ async def main(args):
else:
print("Load config error!")
# internal variable. 說明:這是一個內部變數,請略過。
url = ""
last_url = ""
@ -2250,6 +2247,9 @@ async def main(args):
if len(url) == 0:
continue
if not is_refresh_datetime_sent:
is_refresh_datetime_sent = await check_refresh_datetime_occur(tab, config_dict["refresh_datetime"])
is_maxbot_paused = False
if os.path.exists(CONST_MAXBOT_INT28_FILE):
is_maxbot_paused = True
@ -2269,9 +2269,6 @@ async def main(args):
time.sleep(0.1)
continue
if not is_refresh_datetime_sent:
is_refresh_datetime_sent = await check_refresh_datetime_occur(tab, config_dict["refresh_datetime"])
# for kktix.cc and kktix.com
if 'kktix.c' in url:
is_quit_bot = await nodriver_kktix_main(tab, url, config_dict)