Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll Spams AWS SWF API #9

Open
dayyan opened this issue Nov 18, 2016 · 2 comments
Open

Poll Spams AWS SWF API #9

dayyan opened this issue Nov 18, 2016 · 2 comments

Comments

@dayyan
Copy link

dayyan commented Nov 18, 2016

Looks like the polling mechanism polls like crazy.

I, [2016-11-18T23:30:30.450000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.462000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.470000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.482000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.503000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.512000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.528000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:30.843000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:31.156000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:31.477000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:31.788000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:32.103000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:32.414000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:32.725000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:34.844000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:36.967000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:39.090000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:39.099000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:41.221000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:43.364000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:43.694000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***
I, [2016-11-18T23:30:45.812000 #4545]  INFO -- : [4972] Polling for task on sec-flow-*** - ***_activity_tasklist_***

The worker should allow a wait period to be specified, with a default.
I'm guessing it would be a good idea to introduce that somewhere here: https://github.com/djpate/jflow/blob/master/lib/jflow/activity/worker.rb#L25-L52

@djpate
Copy link
Owner

djpate commented Nov 18, 2016

Polling from AWS takes about 60 secs IIRC. This might be each worker polling?

JFlow.configuration.swf_client.poll_for_activity_task(poll_params)

This should block for 60sec

@dayyan
Copy link
Author

dayyan commented Nov 18, 2016

I think the [4972] above is the same worker, is it?
https://github.com/djpate/jflow/blob/master/lib/jflow/activity/worker.rb#L61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants