print server with new concept
This commit is contained in:
@@ -34,14 +34,8 @@ public class PrintLoop
|
||||
while (!_cancellationSource!.Token.IsCancellationRequested)
|
||||
{
|
||||
var job = await _jobSource.GetNextJobAsync(_cancellationToken);
|
||||
var assigned = _assignedPrinterRepository.GetAssignedPrinter(job.AreaId);
|
||||
if (assigned == null)
|
||||
{
|
||||
_logger.LogWarning("Received print job for unassigned area {AreaId}, skipping", job.AreaId);
|
||||
continue;
|
||||
}
|
||||
|
||||
_printServer.SubmitJob(assigned, job);
|
||||
|
||||
_printServer.SubmitJob(job.IP, job);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user