tutorial_services
¶
Module Contents¶
Classes¶
Abstract class used to define the interface to a service. |
Functions¶
|
Attributes¶
- class tutorial_services.DemoService(memory=None, cores=None, disk=None, accelerators=None, preemptible=None, unitName=None)¶
Bases:
toil.job.Job.Service
Abstract class used to define the interface to a service.
Should be subclassed by the user to define services.
Is not executed as a job; runs within a ServiceHostJob.
- start(fileStore)¶
Start the service.
- Parameters
job – The underlying host job that the service is being run in. Can be used to register deferred functions, or to access the fileStore for creating temporary files.
- Returns
An object describing how to access the service. The object must be pickleable and will be used by jobs to access the service (see
toil.job.Job.addService()
).
- check()¶
Checks the service is still running.
- Raises
exceptions.RuntimeError – If the service failed, this will cause the service job to be labeled failed.
- Returns
True if the service is still running, else False. If False then the service job will be terminated, and considered a success. Important point: if the service job exits due to a failure, it should raise a RuntimeError, not return False!
- stop(fileStore)¶
Stops the service. Function can block until complete.
- Parameters
job – The underlying host job that the service is being run in. Can be used to register deferred functions, or to access the fileStore for creating temporary files.
- tutorial_services.j¶
- tutorial_services.s¶
- tutorial_services.loginCredentialsPromise¶
- tutorial_services.dbFn(loginCredentials)¶