Skip to content

Commit

Permalink
don't kill submit because of bad actors
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Nov 1, 2024
1 parent ae36656 commit ecd9d69
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions iceprod/server/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,16 @@ async def get_tasks_to_queue(self, num: int) -> list[Task]:

tasks = []
for f in asyncio.as_completed(futures):
task = await f
# add default resource requirements
task.requirements = self._get_resources(task)
try:
task = await f
except Exception: # already logged in function
continue
try:
# add default resource requirements
task.requirements = self._get_resources(task)
except Exception:
logger.warning('cannot get task resources for %s.%s', task.dataset.dataset_id, task.task_id, exc_info=True)
continue
tasks.append(task)

return tasks
Expand Down Expand Up @@ -176,7 +183,7 @@ async def _convert_to_task(self, task):
add_default_options(config['options'])

except Exception:
logger.warning('Error converting task dict to task: %s.%s', task['dataset_id'], task['task_id'])
logger.warning('Error converting task dict to task: %s.%s', task['dataset_id'], task['task_id'], exc_info=True)
raise

return t
Expand Down

0 comments on commit ecd9d69

Please sign in to comment.