Ejemplo n.º 1
0
        private async Task <bool> NotifyStatus(Guid id, ILambdaLogger logger)
        {
            try
            {
                var topic = await SNSClient.FindTopicAsync(Config.GetSection("SimpleNotificationServiceTopic").Value);

                if (topic != null)
                {
                    await SNSClient.PublishAsync(topic.TopicArn, $"Batch job will be scheduled for {id}").ConfigureAwait(false);
                }
            }
            catch (Exception ex)
            {
                logger.LogLine("error on sending status");
                logger.LogLine(ex.Message);
                logger.LogLine(ex.StackTrace);
                throw;
            }

            return(true);
        }