Class: OodCore::Job::Adapter Abstract
- Inherits:
-
Object
- Object
- OodCore::Job::Adapter
- Defined in:
- lib/ood_core/job/adapter.rb
Overview
A class that handles the communication with a resource manager for submitting/statusing/holding/deleting jobs
Direct Known Subclasses
OodCore::Job::Adapters::Lsf, OodCore::Job::Adapters::Slurm, OodCore::Job::Adapters::Torque
Instance Method Summary collapse
-
#delete(id) ⇒ void
abstract
Delete the submitted job.
-
#hold(id) ⇒ void
abstract
Put the submitted job on hold.
-
#info(id) ⇒ Info
abstract
Retrieve job info from the resource manager.
-
#info_all ⇒ Array<Info>
abstract
Retrieve info for all jobs from the resource manager.
-
#release(id) ⇒ void
abstract
Release the job that is on hold.
-
#status(id) ⇒ Status
abstract
Retrieve job status from resource manager.
-
#submit(script, after: [], afterok: [], afternotok: [], afterany: []) ⇒ String
abstract
Submit a job with the attributes defined in the job template instance.
Instance Method Details
#delete(id) ⇒ void
Subclass is expected to implement #delete
This method returns an undefined value.
Delete the submitted job
84 85 86 |
# File 'lib/ood_core/job/adapter.rb', line 84 def delete(id) raise NotImplementedError, "subclass did not define #delete" end |
#hold(id) ⇒ void
Subclass is expected to implement #hold
This method returns an undefined value.
Put the submitted job on hold
66 67 68 |
# File 'lib/ood_core/job/adapter.rb', line 66 def hold(id) raise NotImplementedError, "subclass did not define #hold" end |
#info(id) ⇒ Info
Subclass is expected to implement #info
Retrieve job info from the resource manager
47 48 49 |
# File 'lib/ood_core/job/adapter.rb', line 47 def info(id) raise NotImplementedError, "subclass did not define #info" end |
#info_all ⇒ Array<Info>
Subclass is expected to implement #info_all
Retrieve info for all jobs from the resource manager
38 39 40 |
# File 'lib/ood_core/job/adapter.rb', line 38 def info_all raise NotImplementedError, "subclass did not define #info_all" end |
#release(id) ⇒ void
Subclass is expected to implement #release
This method returns an undefined value.
Release the job that is on hold
75 76 77 |
# File 'lib/ood_core/job/adapter.rb', line 75 def release(id) raise NotImplementedError, "subclass did not define #release" end |
#status(id) ⇒ Status
Subclass is expected to implement #status
Optimized slightly over retrieving complete job information from server
Retrieve job status from resource manager
57 58 59 |
# File 'lib/ood_core/job/adapter.rb', line 57 def status(id) raise NotImplementedError, "subclass did not define #status" end |
#submit(script, after: [], afterok: [], afternotok: [], afterany: []) ⇒ String
Subclass is expected to implement #submit
Submit a job with the attributes defined in the job template instance
30 31 32 |
# File 'lib/ood_core/job/adapter.rb', line 30 def submit(script, after: [], afterok: [], afternotok: [], afterany: []) raise NotImplementedError, "subclass did not define #submit" end |