print server with new concept
This commit is contained in:
@@ -20,7 +20,7 @@ public class SignalRPrintJobSource: IPrintJobSource
|
||||
_logger = logger;
|
||||
|
||||
_connection = new HubConnectionBuilder()
|
||||
.WithUrl("https://api.stage.gastrojames.ch/hubs/internal?access_token=https://api.stage.gastrojames.ch/hubs/internal")
|
||||
.WithUrl("https://api.dev.gastrojames.ch/hubs/printer-servers")
|
||||
.WithAutomaticReconnect(new InfiniteRetryPolicy())
|
||||
.Build();
|
||||
|
||||
@@ -92,8 +92,8 @@ public class SignalRPrintJobSource: IPrintJobSource
|
||||
_logger.LogInformation("Received print job for working area: {PrintJob}", JsonSerializer.Serialize(args));
|
||||
_printJobChannel.Writer.TryWrite(new PrintJob
|
||||
{
|
||||
AreaId = args.WorkingAreaId,
|
||||
Document = args.Content,
|
||||
IP = args.PrinterIp,
|
||||
Document = args,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -104,8 +104,15 @@ public class SignalRPrintJobSource: IPrintJobSource
|
||||
|
||||
public class PrintJobFromSignalR
|
||||
{
|
||||
[JsonPropertyName("workingAreaId")]
|
||||
public string WorkingAreaId { get; set; }
|
||||
[JsonPropertyName("printerIp")]
|
||||
public string PrinterIp { get; set; }
|
||||
|
||||
[JsonPropertyName("logoUrl")]
|
||||
public string? LogoUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("receiptType")]
|
||||
public int ReceiptType { get; set; }
|
||||
|
||||
[JsonPropertyName("content")]
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user