This commit is contained in:
Administrator 2023-07-03 16:53:04 +08:00
parent 2ba957c302
commit edf48c0825
1 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,7 @@ class DailyNotice:
while True: while True:
time.sleep(15) time.sleep(15)
now = datetime.now() now = datetime.now()
if is_workday() and now.hour == 15 and (15 <= now.minute < 15 + 3) and not sended: if is_workday() and now.hour == 15 and (35<= now.minute < 35 + 3) and not sended:
sended = True sended = True
try: try:
user_list = get_user_not_fill_daily() user_list = get_user_not_fill_daily()
@ -157,6 +157,7 @@ class DailyNotice:
def email_send_thread(self, args_list, sem=5): def email_send_thread(self, args_list, sem=5):
with ThreadPoolExecutor(max_workers=sem) as executor: with ThreadPoolExecutor(max_workers=sem) as executor:
for args in args_list: for args in args_list:
time.sleep(1)
executor.submit(self.send_email, *args) executor.submit(self.send_email, *args)
def init(self): def init(self):