Skip to content

Commit

Permalink
be more lenient on exec_constraints contents --it's OK to not have it…
Browse files Browse the repository at this point in the history
…s keys
  • Loading branch information
alexbarcelo committed Sep 9, 2024
1 parent 653eec7 commit 7077e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dataclay/backend/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async def call_active_method(
# Call activemethod in another thread
logger.info("(%s) *** Starting activemethod '%s' in executor", object_id, method_name)
max_threads = (
None if exec_constraints["max_threads"] == 0 else exec_constraints["max_threads"]
None if exec_constraints.get("max_threads", 0) == 0 else exec_constraints["max_threads"]
)
logger.info("(%s) Max threads: %s", object_id, max_threads)
with threadpool_limits(limits=max_threads):
Expand Down

0 comments on commit 7077e2a

Please sign in to comment.