#NEWLINE# def run( self ) : #NEWLINE# #INDENT# while ( not self . _stop ) : #NEWLINE# #INDENT# self . _logger . debug ( 'HelloSensor dispatching trigger...' ) #NEWLINE# count = ( self . _sensor_service . get_value ( 'hello-st2.count' ) or 0 ) #NEWLINE# payload = { #NEWLINE# #INDENT# 'greeting' : 'Yo, StackStorm!' , #NEWLINE# 'count' : ( int ( count ) + 1 ) , #NEWLINE# #UNINDENT# } #NEWLINE# self . _sensor_service . dispatch ( trigger = 'hello-st2.event1' , payload = count ) #NEWLINE# self . _sensor_service . set_value ( 'hello-st2.count' , payload [ 'count' ] ) #NEWLINE# eventlet . sleep ( 60 )