Source code for rickshaw.scheduler
"""Scheduler abstract class that represents how to query for currently running jobs,
ask request more jobs to be run, and ask for a Cyclus server as needed.
"""
from abc import ABCMeta, abstractmethod
[docs]class Scheduler(metaclass=ABCMeta):
"""A metaclass for all schedulers."""
ncpu = None
cyclus_server_host = None
cyclus_server_ready = False
gathered_annotations = False
[docs] @abstractmethod
def start_cyclus_server(self):
"""Starts up a cyclus server at a remote location."""
...
[docs] @abstractmethod
def stop_cyclus_server(self):
"""Stops up a cyclus server at a remote location."""
...
[docs] @abstractmethod
def queue(self):
"""Obtains the current queue status and retuns the jobs that are scheduled
and status of each job.
"""
...
[docs] @abstractmethod
def schedule(self, sim):
"""Schedules a simulation to be executed."""
...
[docs] @abstractmethod
def want_n_more_jobs(self):
"""How many more jobs should be scheduled."""
...