emit insin telemetry for job outcomes in PrinterQueue
This commit is contained in:
@@ -8,18 +8,19 @@ public class PrintServer
|
||||
private readonly IPrintService _printService;
|
||||
private readonly ILogger _logger;
|
||||
private readonly IJobStatusReporter _statusReporter;
|
||||
private readonly Inspectron.Epson.PrintServer.Telemetry.IInsinTelemetry _telemetry;
|
||||
private readonly ConcurrentDictionary<string, PrinterQueue> _printerQueues;
|
||||
private readonly SemaphoreSlim _printDiscoveryLock = new(1, 1);
|
||||
private int _readerCount = 0;
|
||||
private readonly object _readerCountLock = new();
|
||||
|
||||
public PrintServer(IPrintService printService, ILogger logger, IJobStatusReporter statusReporter)
|
||||
public PrintServer(IPrintService printService, ILogger logger, IJobStatusReporter statusReporter, Inspectron.Epson.PrintServer.Telemetry.IInsinTelemetry telemetry)
|
||||
{
|
||||
_printService = printService;
|
||||
_logger = logger;
|
||||
_statusReporter = statusReporter;
|
||||
_telemetry = telemetry;
|
||||
_printerQueues = new ConcurrentDictionary<string, PrinterQueue>();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -80,7 +81,7 @@ public class PrintServer
|
||||
|
||||
public void RegisterPrinter(string printerIp)
|
||||
{
|
||||
var queue = new PrinterQueue(printerIp, _printService, _logger, this, _statusReporter);
|
||||
var queue = new PrinterQueue(printerIp, _printService, _logger, this, _statusReporter, _telemetry);
|
||||
if (_printerQueues.TryAdd(printerIp, queue))
|
||||
{
|
||||
queue.Start();
|
||||
|
||||
Reference in New Issue
Block a user