Skip to content

Commit

Permalink
fixed module error
Browse files Browse the repository at this point in the history
  • Loading branch information
pratham-darooka committed Jun 18, 2024
1 parent 07a5fe8 commit fe94ef7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/db/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions app/utils/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion jobs/update_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fe94ef7

Please sign in to comment.