Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

Upstart currently allows jobs to define a list of events that can cause it to be started and stopped, where any single one of these events changes the goal. This specification proposes the replacement of this simple behaviour with the ability to construct more complex expressions for the set of events that start the job and set that stop it, and the job changes necessary as a result of this.

Rationale

A simple list of possible events is sufficient for starting tasks that deal with just that event, however it is not sufficient for more complicated scenarios where multiple events may be required.

Use cases

Scope

This scope of this specification is limited to changes to job handling to allow for event expressions to start and stop the job, rather than a list of any given events. Since this changes the fundamental assertion that there is only one "cause" of a goal change, the scope includes the changes necessary to allow for multiple "cause"s.

Complex periods of events are not defined by this specification, instead this specification allows a job to define one single period between expressions. The ability to define and use multiple periods will be defined by the States specification.

Design

Syntax

Behaviour

Job Environment

Notification

Implementation

Code

Data preservation and migration

These changes are not entirely backwards compatible with the previous behaviour, since multiple start on and stop on stanzas have previously appended to the list of events and must now be changed to a single stanza with repeated use of the or operator.

At this phase of Upstart development, it is acceptable for job authors to be required to change their jobs.

Unresolved issues


JobEventExpressions (last edited 2011-08-26 04:10:17 by localhost)