Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleExample - timeout function block


Code Block
languagetext
themeEclipse
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]


stopInput

Note
titleNote!

This function block only applies for the Python collection agent.

...

Info
titleExample - stopInput function block


Code Block
def stopInput():
    debug('stopInput called')



Scroll ignore
scroll-viewportfalse
scroll-pdftrue
scroll-officefalse
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse


Next: