On 09/09/10 - 04:50:31PM, Mohammed Morsi wrote: > --- > src/dbomatic/dbomatic.rb | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/src/dbomatic/dbomatic.rb b/src/dbomatic/dbomatic.rb > index 1fd8948..00d815c 100644 > --- a/src/dbomatic/dbomatic.rb > +++ b/src/dbomatic/dbomatic.rb > @@ -58,6 +58,12 @@ class CondorEventLog < Nokogiri::XML::SAX::Document > InstanceEvent.create! :instance => inst, > :event_type => @event_type, > :event_time => @event_time > + if @event_type == 'ExecuteEvent' > + inst.state = Instance::STATE_RUNNING
I'm not quite sure if this is going to work on the ExecuteEvent. At least on my condor instance, when an ExecuteEvent happens, there is no corresponding Cmd set in the event. We'll need to do something more clever here; either modify condor to always add Cmd to the event, or look at other events to surmise a transition to STATE_RUNNING. I'm going to poke around a bit at this and see what I can figure out. > + elsif @event_type == 'JobTerminated' > + inst.state = Instance::STATE_STOPPED > + end > + inst.save I think this last line needs to be: inst.save! -- Chris Lalancette _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
