Skip to content

Instantly share code, notes, and snippets.

@pi-chan
Last active August 29, 2015 14:12
Show Gist options
  • Save pi-chan/ade3b62aabbdec1afde4 to your computer and use it in GitHub Desktop.
Save pi-chan/ade3b62aabbdec1afde4 to your computer and use it in GitHub Desktop.
awaitで処理が返ってこない
private async Task<Message> GetItemIdFromQueue()
{
AmazonSQSClient client = new AmazonSQSClient( ACCESS_KEY, SECRET_KEY, Amazon.RegionEndpoint.APNortheast1 );
ReceiveMessageRequest req = new ReceiveMessageRequest();
req.MaxNumberOfMessages = 1;
req.QueueUrl = QUEUE_URL;
ReceiveMessageResponse res = await client.ReceiveMessageAsync( req ); // この行
if ( res.HttpStatusCode != System.Net.HttpStatusCode.OK ) {
LogError( res.ToString() );
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment