adaptive_scheduler._mock_scheduler module¶
- class adaptive_scheduler._mock_scheduler.MockScheduler(*, startup_delay=3, max_running_jobs=4, refresh_interval=0.1, bash='bash', url=None)[source]¶
Bases:
objectEmulates a HPC-like scheduler.
Start an instance of
MockSchedulerand then you are able to do` python _mock_scheduler.py --queue python _mock_scheduler.py --submit JOB_NAME_HERE script_here.sh # returns JOB_ID python _mock_scheduler.py --cancel JOB_ID `- Parameters:
startup_delay (
int) – The waiting before starting the process.max_running_jobs (
int) – Maximum number of simultaneously running jobs.refresh_interval (
float) – Refresh interval of checking whether proccesses are still running.bash (
str) –bashexecutable.url (
str|None) – The URL of the socket. Defaults to {DEFAULT_URL}.
- adaptive_scheduler._mock_scheduler.cancel(job_id, url='tcp://127.0.0.1:60547')[source]¶
- Return type: