Skip to content

Commit 2c4821a

Browse files
Apply suggestions from code review
Co-authored-by: Lin Zhihao <[email protected]>
1 parent a4546cf commit 2c4821a

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

components/clp-package-utils/clp_package_utils/general.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,11 @@ def validate_results_cache_config(
495495
)
496496

497497

498-
def validate_logs_input_config(clp_config: CLPConfig):
498+
def validate_logs_input_config(clp_config: CLPConfig) -> None:
499499
clp_config.validate_logs_input_config()
500500

501501

502-
def validate_output_storage_config(clp_config: CLPConfig):
502+
def validate_output_storage_config(clp_config: CLPConfig) -> None:
503503
clp_config.validate_archive_output_config()
504504
clp_config.validate_stream_output_config()
505505

components/job-orchestration/job_orchestration/garbage_collector/archive_garbage_collector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ async def archive_garbage_collector(
204204
recovery_file = clp_config.logs_directory / f"{ARCHIVE_GARBAGE_COLLECTOR_NAME}.tmp"
205205

206206
logger.info(f"{ARCHIVE_GARBAGE_COLLECTOR_NAME} started.")
207-
# Start retention loop
208207
try:
209208
while True:
210209
_collect_and_sweep_expired_archives(

components/job-orchestration/job_orchestration/garbage_collector/search_result_garbage_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _collect_and_sweep_expired_search_results(
6363
job_results_collection.drop()
6464
deleted_job_ids.append(int(job_id))
6565

66-
logger.debug(f"deleted search results of job(s): {deleted_job_ids}.")
66+
logger.debug(f"Deleted search results of job(s): {deleted_job_ids}.")
6767

6868

6969
async def search_result_garbage_collector(

components/job-orchestration/job_orchestration/garbage_collector/utils.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ def execute_deletion(output_config: ArchiveOutput, deletion_candidates: Set[str]
8989

9090
class DeletionCandidatesBuffer:
9191
"""
92-
A class representing an in-memory buffer for candidates with fault-tolerance support.
92+
Represents an in-memory buffer for deletion candidates with fault-tolerance support.
9393
94-
This class support recovering from a previous failure by reading previously persisted candidates
95-
from a recovery file. The user is expected to explicitly call `persists_new_candidates` to
96-
persist any new candidates on to the disk for fault-tolerance purposes.
94+
This class supports recovering from a previous failure by reading previously persisted
95+
candidates from a recovery file. The user is expected to explicitly call
96+
`persist_new_candidates` to persist any new candidates on to the disk for fault-tolerance
97+
purposes.
9798
9899
:param recovery_file_path: Path to the file used for recovering and persisting candidates.
99100
:raises ValueError: If the recovery path exists but is not a file.
@@ -137,10 +138,10 @@ def persist_new_candidates(self) -> None:
137138

138139
def clear(self):
139140
"""
140-
Clear the in-memory buffer of candidates and remove the recovery file.
141+
Clears the in-memory buffer of candidates and removes the recovery file.
141142
142-
This is intended to be called after the caller finished processing all candidates (i.e. when
143-
recovery is no longer needed for the candidates.)
143+
This is intended to be called after the caller finished processing all candidates (i.e.,
144+
when recovery is no longer needed for the candidates.)
144145
"""
145146
self._candidates.clear()
146147
if self._recovery_file_path.exists():

0 commit comments

Comments
 (0)