mirror of
https://github.com/evilhero/mylar
synced 2024-12-27 10:06:52 +00:00
25 lines
710 B
Python
Executable file
25 lines
710 B
Python
Executable file
"""
|
|
Abstract base class that provides the interface needed by all job stores.
|
|
Job store methods are also documented here.
|
|
"""
|
|
|
|
|
|
class JobStore(object):
|
|
def add_job(self, job):
|
|
"""Adds the given job from this store."""
|
|
raise NotImplementedError
|
|
|
|
def update_job(self, job):
|
|
"""Persists the running state of the given job."""
|
|
raise NotImplementedError
|
|
|
|
def remove_job(self, job):
|
|
"""Removes the given jobs from this store."""
|
|
raise NotImplementedError
|
|
|
|
def load_jobs(self):
|
|
"""Loads jobs from this store into memory."""
|
|
raise NotImplementedError
|
|
|
|
def close(self):
|
|
"""Frees any resources still bound to this job store."""
|