diff --git a/API/__pycache__/rokky.cpython-313.pyc b/API/__pycache__/rokky.cpython-313.pyc index 47039a2..f2cad19 100644 Binary files a/API/__pycache__/rokky.cpython-313.pyc and b/API/__pycache__/rokky.cpython-313.pyc differ diff --git a/API/rokky.py b/API/rokky.py index f23587f..16997be 100644 --- a/API/rokky.py +++ b/API/rokky.py @@ -132,6 +132,7 @@ def get_genres(product): def save_product(conn, product): + conn = sqlite3.connect("./files/rokky.db") cursor = conn.cursor() cursor.execute(""" diff --git a/services/__pycache__/red.cpython-313.pyc b/services/__pycache__/red.cpython-313.pyc index aa6bb55..fb73795 100644 Binary files a/services/__pycache__/red.cpython-313.pyc and b/services/__pycache__/red.cpython-313.pyc differ diff --git a/services/__pycache__/tim.cpython-313.pyc b/services/__pycache__/tim.cpython-313.pyc index 9e7ddd7..0620b5d 100644 Binary files a/services/__pycache__/tim.cpython-313.pyc and b/services/__pycache__/tim.cpython-313.pyc differ diff --git a/services/red.py b/services/red.py index 0a5ae54..d98a5bc 100644 --- a/services/red.py +++ b/services/red.py @@ -14,9 +14,15 @@ def run_task(): def run_task1(): + print("START download_products") download_products() + print("START decrypt_and_unpack") decrypt_and_unpack("products") + print("START add_product") + add_product() + print("END-s add_product!!!") + print("REDs download__product:", datetime.datetime.now()) def run_task2(): diff --git a/services/tim.py b/services/tim.py index b65df49..85168f6 100644 --- a/services/tim.py +++ b/services/tim.py @@ -11,7 +11,7 @@ def start_scheduler(): scheduler.add_job(run_task2, 'interval', minutes=1, next_run_time=datetime.datetime.now()) scheduler.add_job(run_task, 'interval', minutes=5) - scheduler.add_job(run_task1, 'interval', days=1) + scheduler.add_job(run_task1, 'interval', days=1, next_run_time=datetime.datetime.now()) # scheduler.add_job( # run_task3, # 'interval',