From 089803c599e66592795e3f85f3b56358f376b8f4 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 15 Sep 2019 20:53:23 +0900 Subject: [PATCH] =?UTF-8?q?cron=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/run_daemon.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/run_daemon.py b/src/run_daemon.py index 78d0268f..79d7cbfe 100644 --- a/src/run_daemon.py +++ b/src/run_daemon.py @@ -5,9 +5,11 @@ import time import glob import urllib.request import concurrent.futures +from datetime import datetime def run(webPath): - print(webPath) + now = datetime.now() + print(now.strftime("%Y-%m-%d %H:%M:%S"), webPath) obj = urllib.request.urlopen(webPath) obj.read() @@ -44,7 +46,7 @@ def main(): servList.append(webPath) - with concurrent.futures.ThreadPoolExecutor(max_workers=len(servList)) as executor: + with concurrent.futures.ThreadPoolExecutor(max_workers=max(1,len(servList))) as executor: waiters=[] for resetPath in autoResetList: future = executor.submit(run, resetPath)