Ejemplo n.º 1
0
        public void should_Send_Extracts()
        {
            var sendTo = new SendManifestPackageDTO(_registry);

            var responses = _dwhSendService.SendExtractsAsync(sendTo).Result;

            Assert.True(responses.Any());
            foreach (var sendManifestResponse in responses)
            {
                Console.WriteLine(sendManifestResponse);
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> SendMpi([FromBody] SendManifestPackageDTO packageDTO)
        {
            if (!packageDTO.IsValid())
            {
                return(BadRequest());
            }
            try
            {
                await _dwhSendService.SendExtractsAsync(packageDTO);

                return(Ok());
            }
            catch (Exception e)
            {
                var msg = $"Error sending to DWH {e.Message}";
                Log.Error(e, msg);
                return(StatusCode(500, msg));
            }
        }
Ejemplo n.º 3
0
 private void QueueDwh(SendManifestPackageDTO package)
 {
     BackgroundJob.Enqueue(() => _dwhSendService.SendExtractsAsync(package));
 }