public async Task Process(ToSendMessageFromQueue message) { try { await _log.WriteInfoAsync(_component, "", message.Id, $"Cash out request grabbed: Address: '{message.Address}', Amount: {message.Amount}"); if (_existingTxes.Any(x => x.RowKey == message.Id)) { return; } var resultTxId = await _rpcClient.SendToAddress(message.Address, message.Amount); await _existingTxes.InsertAsync(new ExistingCashOutEntity { PartitionKey = "part", RowKey = message.Id }); await _log.WriteInfoAsync(_component, "", message.Id, $"Cash out succeded. Resulting transaction Id: '{resultTxId}'"); } catch (Exception e) { //await _slackNotifier.Notify(new SlackMessage { Sender = _component, Type = "Errors", Message = "Error occured during cashout" }); await _log.WriteErrorAsync(_component, "", message.Id, e); throw; } }
public bool Any() { return _tableStorage.Any(); }