Intersections¶
-
class
motorway.intersection.
Intersection
(process_uuid=None)[source]¶ Intersections receive messages and generate either:
- A spin-off message
Spin-off messages will keep track of the state of the entire message tree and re-run it if failed. This means that if you want to re-run the message all the way from the ramp in case of an error, you should make a spin-off message.
- Message.new(message, {
- {
- ‘word’: ‘hello’, ‘count’: 1
}, grouping_value=’hello’
})
- A brand new message
The message will be created with the intersection as producer. The intersection will not receive feedback if it is successful or not and hence will not be re-tried in the case of an error.
Message(uuid.uuid4()
-
process
(message)[source]¶ This function is called continuously by the intersection.
Yield: motorway.messages.Message
instanceParameters: message – motorway.messages.Message
instance orlist()
if usingmotorway.decorators.batch_process()