WiFi Pineapple Python Job Manager Class
Table of contents
Introduction
Python API
Classes
class JobManager
Methods
def get_job(self, job_id: str, remove_if_complete: bool = True) -> Optional[Job]
Parameters
- job_id: The id of the job to find.
- remove_if_complete: True to delete the job from memory after its complete. (Default: True)
Returns
- Optional[Job]: an instance of Job if found, else None
def prune_completed_jobs(self)
def remove_job(self, job_id: str)
Parameters
- job_id: The id of the job to delete.
def execute_job(self, job: Job, callbacks: List[Callable[[Job], None]] = None) -> str
Parameters
- job: an instance of Job to start running.
- callbacks: An optional list of functions that take `job` as a parameter to be called when completed. These will be called regardless if `job` raises an exception or not.
Returns
- str: The id of the running job.