-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
40 lines (37 loc) · 1.08 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Newtonsoft.Json;
using RabbitMQ.Client;
using Serilog;
using Shared;
using System;
using System.Threading;
namespace Ingestion
{
class Program
{
static void Main(string[] args)
{
ILogger logger = new LoggerConfiguration().WriteTo.Console().CreateLogger();
string sourceID = "";
/*
try {
sourceID = args[0];
} catch (Exception e) {
logger.Error("Incorrect argument for ingestion dll crontab: " + e.Message);
}
*/
sourceID = "ResellerData";
if (sourceID != ""){
IngestionService ingestService = new IngestionService(logger);
try {
while (true) {
ingestService.Ingest(sourceID);
Thread.Sleep(3000);
}
} catch(Exception e)
{
logger.Error("Error: " + e.Message + "\n" + "Exception trace: " + e.StackTrace);
}
}
}
}
}