The function blocks described in this section only apply for Python agents in real-time workflows.
timeout
This function block is called when using the setTimeout
function.
...
Info |
---|
title | Example - timeout function block |
---|
|
Code Block |
---|
| sessions = {}
def consume(input):
setTimeout(input.key, 1.2)
sessions[input.key] = sessions.get(input.key, 0) + input.value
def timeout(obj):
debug('Timed out, removing %s' % obj)
del sessions[obj] |
|
Note |
---|
|
This function block only applies for the Python collection agent. |
...
Info |
---|
title | Example - stopInput function block |
---|
|
Code Block |
---|
def stopInput():
debug('stopInput called')
|
|
Scroll ignore |
---|
scroll-viewport | false |
---|
scroll-pdf | true |
---|
scroll-office | false |
---|
scroll-chm | true |
---|
scroll-docbook | true |
---|
scroll-eclipsehelp | true |
---|
scroll-epub | true |
---|
scroll-html | false |
---|
|
Next:
|