public async Task CreateCommand(IEnumerable <string> blocks, string email)
        {
            var msg = new BlockTransactionReportQueueCommand
            {
                Blocks = blocks.ToArray(),
                Email  = email
            };

            await _queue.PutRawMessageAsync(msg.ToJson());
        }
        public async Task CreateReport(BlockTransactionReportQueueCommand command)
        {
            try
            {
                await _log.WriteInfoAsync(nameof(BlockTransactionsQueueFunctions),
                                          nameof(CreateReport),
                                          command.ToJson(), "Started");

                var reportDate = DateTime.UtcNow;

                var saveResults = await command.Blocks.SelectAsync(p => Retry.Try(() => SaveReport(p), nameof(CreateReport), 5, logger: _log));


                if (!string.IsNullOrEmpty(command.Email))
                {
                    var reportDescrpt = saveResults.Select(p => $"Report for blocks at {reportDate:f} - {p.url}");
                    var emailMes      = new EmailMessage
                    {
                        Subject  = $"Report for block {command.Blocks} at {reportDate:f}",
                        HtmlBody = string.Join("<br/>", reportDescrpt)
                    };

                    await _emailSenderProducer.SendAsync(emailMes, new EmailAddressee { DisplayName = command.Email, EmailAddress = command.Email });
                }

                await _log.WriteInfoAsync(nameof(BlockTransactionsQueueFunctions),
                                          nameof(CreateReport),
                                          command.ToJson(), "Done");
            }
            catch (Exception e)
            {
                await _log.WriteErrorAsync(nameof(BlockTransactionsQueueFunctions),
                                           nameof(CreateReport),
                                           command.ToJson(), e);

                throw;
            }
        }