-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
73 lines (50 loc) · 1.67 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using BlazorQueue;
using ClipHunta2;
using Serilog;
using ServiceStack;
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Console()
.WriteTo.File("logs/testing.txt", rollingInterval: RollingInterval.Day)
.CreateLogger();
Console.WriteLine("Hello, World!");
#if TrainingData
TrainingDataTaskManager.GetInstance().AddLongTasker();
#endif
ImageScannerTaskManager.GetInstance().AddLongTasker();
ImageScannerTaskManager.GetInstance().AddLongTasker();
ImageScannerTaskManager.GetInstance().AddLongTasker();
ImageScannerTaskManager.GetInstance().AddLongTasker();
EventRouterTaskManager.GetInstance().AddLongTasker();
TesseractLongTaskManager.GetInstance().AddLongTasker();
TesseractLongTaskManager.GetInstance().AddLongTasker();
ImagePrepperTaskManager.GetInstance().AddLongTasker();
ImagePrepperTaskManager.GetInstance().AddLongTasker();
Console.WriteLine(args);
string baseUri = "https://localhost:5001/";
string userName = "";
string password = "";
var apiClient = new JsonApiClient(baseUri);
//try
//{
// var authResult = await apiClient.PostAsync(new Authenticate()
// {
// UserName = userName,
// Password = password
// });
//}
//catch (Exception ex)
//{
// //todo: what if the generated login gets misconfigured and doesn't work. Well ur right here looking at this.
// Log.Logger.Error(ex, "Yeah this nasty error {error}");
// return;
//}
//await ClipBlazorFacadeHelper.Watch("bestboyfriend4", apiClient);
if (args.Length > 1)
{
baseUri = args[1];
}
var info = new HubConnectionInfo(baseUri, "ClipHub", null);
ClipBlazorFacade parent = new(info, ApiClient: apiClient);
await parent.Start();
await parent.Running();