Esempio n. 1
0
        /// <summary>
        /// Process acquiring and upload data
        /// </summary>
        public async Task ProcessNotaries()
        {
            try
            {
                var notaries = _notAcquirer.RetrieveNotaries();
                if (!notaries.Any())
                {
                    throw new Exception("Notaries data not found");
                }

                var chambers   = _notAcquirer.RetrieveChambers();
                var uploadInfo = _notAcquirer.GetUploadInfo();
                await _notSender.SendAsync(_archiver.PackNotaries(notaries, uploadInfo, chambers), _notAcquirer.RecordsCount);
            }
            catch (Exception exc)
            {
                Log.Error(exc, "Error while processing notaries");
            }
        }