Class: SGE::QStat::Parser
- Inherits:
-
Nokogiri::XML::Document
- Object
- Nokogiri::XML::Document
- SGE::QStat::Parser
- Defined in:
- lib/sge/qstat/parser.rb
Constant Summary collapse
- XPATH_JOB_LIST =
'//job_list'
- XPATH_PENDING =
'//job_list[@state="pending"]'
- XPATH_RUNNING =
'//job_list[@state="running"]'
- XPATH_SUSPENDED =
'//job_list[@state="suspended"]'
Instance Method Summary collapse
- #jobs ⇒ Object
- #parse(*args) ⇒ Object
- #pending_jobs ⇒ Object
- #reset! ⇒ Object
- #running_jobs ⇒ Object
- #suspended_jobs ⇒ Object
Instance Method Details
#jobs ⇒ Object
15 16 17 |
# File 'lib/sge/qstat/parser.rb', line 15 def jobs @jobs ||= xpath(XPATH_JOB_LIST) end |
#parse(*args) ⇒ Object
10 11 12 13 |
# File 'lib/sge/qstat/parser.rb', line 10 def parse(*args) reset! super end |
#pending_jobs ⇒ Object
19 20 21 |
# File 'lib/sge/qstat/parser.rb', line 19 def pending_jobs @pending_jobs ||= xpath(XPATH_PENDING) end |
#reset! ⇒ Object
31 32 33 34 35 |
# File 'lib/sge/qstat/parser.rb', line 31 def reset! @jobs = nil @running_jobs = nil @pending_jobs = nil end |
#running_jobs ⇒ Object
23 24 25 |
# File 'lib/sge/qstat/parser.rb', line 23 def running_jobs @running_jobs ||= xpath(XPATH_RUNNING) end |
#suspended_jobs ⇒ Object
27 28 29 |
# File 'lib/sge/qstat/parser.rb', line 27 def suspended_jobs @suspended_jobs ||= xpath(XPATH_SUSPENDED) end |