Skip to content

Commit

Permalink
fetch 2*nCores tasks at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Jun 4, 2015
1 parent e1f023b commit da53992
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void run() {
// Non-blocking poll would return fast if no messages are available.
// However we use long polling just because it polls all servers and gives less false-empties.
ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl)
.withVisibilityTimeout(600).withMaxNumberOfMessages(nCores).withWaitTimeSeconds(1);
.withVisibilityTimeout(600).withMaxNumberOfMessages(nCores * 2).withWaitTimeSeconds(1);
messages = sqs.receiveMessage(receiveMessageRequest).getMessages();
if (!messages.isEmpty()) {
lastQueueUrl = queueUrl;
Expand Down

0 comments on commit da53992

Please sign in to comment.