Skip to content

Commit

Permalink
chore(deps): cloud-sql-python-connector (#1868)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl authored Sep 8, 2024
1 parent 08e18b6 commit 7b441f1
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 155 deletions.
3 changes: 3 additions & 0 deletions keep/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,17 @@ async def on_startup():
if KEEP_ARQ_TASK_POOL != KEEP_ARQ_TASK_POOL_NONE:
event_loop = asyncio.get_event_loop()
if KEEP_ARQ_TASK_POOL == KEEP_ARQ_TASK_POOL_ALL:
logger.info("Starting all task pools")
basic_worker = get_arq_worker(KEEP_ARQ_QUEUE_BASIC)
ai_worker = get_arq_worker(KEEP_ARQ_QUEUE_AI)
event_loop.create_task(basic_worker.async_run())
event_loop.create_task(ai_worker.async_run())
elif KEEP_ARQ_TASK_POOL == KEEP_ARQ_TASK_POOL_AI:
logger.info("Starting AI task pool")
arq_worker = get_arq_worker(KEEP_ARQ_QUEUE_AI)
event_loop.create_task(arq_worker.async_run())
elif KEEP_ARQ_TASK_POOL == KEEP_ARQ_TASK_POOL_BASIC_PROCESSING:
logger.info("Starting Basic Processing task pool")
arq_worker = get_arq_worker(KEEP_ARQ_QUEUE_BASIC)
event_loop.create_task(arq_worker.async_run())
else:
Expand Down
8 changes: 4 additions & 4 deletions keep/workflowmanager/workflowscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def _handle_interval_workflows(self):
try:
# get all workflows that should run due to interval
workflows = get_workflows_that_should_run()
except Exception as e:
self.logger.error(f"Error getting workflows that should run: {e}")
except Exception:
self.logger.exception("Error getting workflows that should run")
pass
for workflow in workflows:
self.logger.debug("Running workflow on background")
Expand Down Expand Up @@ -464,10 +464,10 @@ def _start(self):
try:
self._handle_interval_workflows()
self._handle_event_workflows()
except Exception as e:
except Exception:
# This is the "mainloop" of the scheduler, we don't want to crash it
# But any exception here should be investigated
self.logger.error(f"Error getting workflows that should run: {e}")
self.logger.exception("Error getting workflows that should run")
pass
self.logger.debug("Sleeping until next iteration")
time.sleep(1)
Expand Down
Loading

0 comments on commit 7b441f1

Please sign in to comment.