How do I insert a delay depending on the batch number?

asked 2019-05-07 11:07:15 -0500

streamhada gravatar image

updated 2019-05-07 13:31:39 -0500

metadaddy gravatar image

I did this pipeline , "Jython evaluator" is generating a batch counter. the problem I have is that the "stream selector" is executing delay1 + delay2 + delay3 each time, please here the conditions for the "stream selector" any help Please ? it should go to delay1 or 2 or 3 ?

image description

image description

edit retag flag offensive close merge delete


Can you post the Jython code that is setting /batch_count?

metadaddy gravatar imagemetadaddy ( 2019-05-07 11:12:15 -0500 )edit

It works for me. See the screenshot here -- -- and notice record count in 'Output 1', 'Output 2', and 'Output 3' . Can you run the pipeline and post a similar screenshot?

iamontheinet gravatar imageiamontheinet ( 2019-05-07 12:30:08 -0500 )edit

[From @streamhada] Yes, I have the same as you. But when i check the delay time, it s not. For example: Delay 1 is configured to sleep for 10 sec. Delay 2 is configured to sleep for 20 sec. Delay 3 is configurd to sleep for 1 sec.

metadaddy gravatar imagemetadaddy ( 2019-05-07 13:30:59 -0500 )edit

[From @streamhada] If you configure the pipeline the same way, it will take 31 sec between each batch without considering the conditions in stream selector, which is not correct , it should wait 10 or 20 or 1 sec

metadaddy gravatar imagemetadaddy ( 2019-05-07 13:31:11 -0500 )edit