diff --git a/app/db/common.py b/app/db/common.py index 57019e8..3afa5ac 100644 --- a/app/db/common.py +++ b/app/db/common.py @@ -291,8 +291,8 @@ def write_aggrid_df(table, key, height=550, condition=None, selection=True): gridOptions=gridOptions, enable_enterprise_modules=True, allow_unsafe_jscode=True, - # columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS, - # autoSizeAllColumns=True, + columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS, + autoSizeAllColumns=True, key=key, reload_data=True, theme='alpine', diff --git a/app/utils/services.py b/app/utils/services.py index 9602e50..f6474d7 100644 --- a/app/utils/services.py +++ b/app/utils/services.py @@ -2,12 +2,17 @@ import subprocess import os import threading +import sys def run_subprocess(command): process = subprocess.Popen(args=command) logger.info(f"Started subprocess {command} with PID {process.pid}") def trigger_update_jobs(): + if os.getcwd() not in sys.path: + logger.info(f'Updated sys.path to: {sys.path}') + sys.path.append(os.getcwd()) + pwd = os.path.join(os.getcwd()) env = os.environ.copy() diff --git a/jobs/update_indices.py b/jobs/update_indices.py index d7fc6a9..fa1e84c 100644 --- a/jobs/update_indices.py +++ b/jobs/update_indices.py @@ -104,7 +104,7 @@ async def main(index_list=None): supabase = DB() index_list = supabase.fetch_records("indices") while True: - if not need_run_update_script("indices", ttl=5): + if not need_run_update_script("index_prices", ttl=5): logger.info("No need to run updates, already updated!") break