Skip to content

Commit

Permalink
rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
HansVRP committed Feb 3, 2025
1 parent a7fb9cd commit 368c03a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions openeo/extra/job_management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def _launch_pending_jobs(self, job_db: JobDatabaseInterface, start_job: Callable
jobs_to_add = self._get_jobs_to_launch(not_started, per_backend)
self._run_job_threads(jobs_to_add, start_job, not_started, stats, job_db)

def _get_jobs_to_launch(self, not_started: pd.DataFrame, per_backend: dict) -> List[Tuple[int, str]]:
def _get_jobs_to_launch(self, not_started: pd.DataFrame, per_backend: Dict[str, int]) -> List[Tuple[int, str]]:
"""Determines which jobs to launch based on backend availability."""
jobs_to_add = []
total_added = 0
Expand Down Expand Up @@ -579,10 +579,8 @@ def job_worker():
while not job_queue.empty():
i, backend_name = job_queue.get()
try:
# Pass a copy of the row to avoid race conditions
job_row = not_started.loc[i].copy()
self._launch_job(start_job, job_row, backend_name, stats)

# Process job
self._launch_job(start_job, not_started, i, backend_name, stats)
stats["job launch"] += 1

with self._db_lock:
Expand Down

0 comments on commit 368c03a

Please sign in to comment.