I should say we are still working on this.

Each job currently has a match condition tree. 
When an event is received it activates certain nodes in that tree that
have a match condition for that event. It then evaluates its parents to
see if they have "and"/"or" conditions have matched. When finally the
root of the node becomes true the start/stop on condition is met. 

We add a new kind of terminal node to the condition tree that tests for
state rather then event.
When an job events received are used to track state of the job in these
state nodes. 
Also,
   1. When a job file or instance gets added/deleted, it will generate a
creation/deletion event which is used to update the state in the tree of
other job files.
   2. When a new job file or instance is added its tree to processed to
initialize the state nodes with the current state of jobs it has in its
match criteria.

Sarvi 

-----Original Message-----
From: Kees Jongenburger [mailto:kees.jongenbur...@gmail.com] 
Sent: Wednesday, February 04, 2009 2:17 AM
To: Saravanan Shanmugham (sarvi)
Cc: upstart-devel@lists.ubuntu.com
Subject: Re: Implementing a state machine in upstart (0.5)
Importance: High

Hello Sarvi,

On Fri, Jan 30, 2009 at 7:21 PM, Saravanan Shanmugham (sarvi)
<sa...@cisco.com> wrote:
> We are having the same problem.
>
> We are working on a solution where we can use job-states in the start 
> on condition.
>
> Something like.
>   Start/stop on event_a and state_b
I am trying to understand how you tried to solve the problem.
When an how do you  change the "state_b"?
What happens "while" you are changing it?

Greetings

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to