Class: CPEE::Properties::PutState
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Properties::PutState
- Defined in:
- lib/cpee/implementation_properties.rb
Overview
}}}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(id, opts, state) ⇒ Object
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/cpee/implementation_properties.rb', line 226 def self::run(id,opts,state) case state when 'running' seh = Object.const_get('CPEE::ExecutionHandler::' + CPEE::Persistence::extract_item(id,opts,'executionhandler').capitalize) seh::prepare(id,opts) seh::run(id,opts) when 'stopping' seh = Object.const_get('CPEE::ExecutionHandler::' + CPEE::Persistence::extract_item(id,opts,'executionhandler').capitalize) if seh::stop(id,opts) # process is not running anyway, so change redis PutState::set id, opts, 'stopped' end else ### Most probably this is never needed. Lets see. PutState::set id, opts, state end end |
.set(id, opts, state) ⇒ Object
{{{
222 223 224 |
# File 'lib/cpee/implementation_properties.rb', line 222 def self::set(id,opts,state) CPEE::Persistence::set_item(id,opts,'state',:state => state, :timestamp => Time.now.xmlschema(3)) end |