Skip to content

Commit 21c2914

Browse files
sitaowang1998coderabbitai[bot]
authored andcommitted
Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 8875c6b commit 21c2914

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

components/job-orchestration/job_orchestration/scheduler/compress/compression_scheduler.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ def search_and_schedule_new_tasks(
317317
existing_datasets,
318318
)
319319

320+
320321
def _schedule_job(
321322
clp_config: ClpConfig,
322323
clp_metadata_db_connection_config: dict[str, Any],
@@ -326,7 +327,7 @@ def _schedule_job(
326327
existing_datasets: set[str],
327328
) -> None:
328329
"""
329-
Processes a single pending compression job: deserializes its config, validates input paths,
330+
Schedules a single pending compression job: deserializes its config, validates input paths,
330331
and submits compression tasks.
331332
332333
On failure, the job is marked as FAILED in the database and the function returns early.
@@ -413,9 +414,7 @@ def _schedule_job(
413414
return
414415
elif input_type == InputType.S3_OBJECT_METADATA.value:
415416
try:
416-
_process_s3_object_metadata_input(
417-
input_config, paths_to_compress_buffer, db_context
418-
)
417+
_process_s3_object_metadata_input(input_config, paths_to_compress_buffer, db_context)
419418
except Exception as err:
420419
logger.exception("Failed to process S3 object metadata input for job %s", job_id)
421420
update_compression_job_metadata(
@@ -428,7 +427,7 @@ def _schedule_job(
428427
)
429428
return
430429
else:
431-
logger.error(f"Unsupported input type {input_type}")
430+
logger.error("Unsupported input type %s", input_type)
432431
update_compression_job_metadata(
433432
db_context,
434433
job_id,
@@ -460,9 +459,6 @@ def _schedule_job(
460459
)
461460

462461

463-
464-
465-
466462
def poll_running_jobs(
467463
clp_config: ClpConfig, task_manager: TaskManager, db_context: DbContext
468464
) -> None:

0 commit comments

Comments
 (0)