data_juicer.utils.job.stopper module#

DataJuicer Job Stopper

A utility to stop DataJuicer jobs by reading event logs to find process and thread IDs, then terminating those specific processes and threads.

class data_juicer.utils.job.stopper.JobStopper(job_id: str, base_dir: str = 'outputs/partition-checkpoint-eventlog')[源代码]#

基类:object

Stop DataJuicer jobs using event log-based process discovery.

__init__(job_id: str, base_dir: str = 'outputs/partition-checkpoint-eventlog')[源代码]#
terminate_process_gracefully(proc, timeout: int = 10) bool[源代码]#

Terminate a process gracefully with timeout.

cleanup_job_resources() None[源代码]#

Clean up job resources and update job summary.

stop_job(force: bool = False, timeout: int = 30) Dict[str, Any][源代码]#

Stop the DataJuicer job using event log-based process discovery.

data_juicer.utils.job.stopper.stop_job(job_id: str, base_dir: str = 'outputs/partition-checkpoint-eventlog', force: bool = False, timeout: int = 30) Dict[str, Any][源代码]#

Stop a DataJuicer job using event log-based process discovery.

data_juicer.utils.job.stopper.main()[源代码]#

Main function for command-line usage.