feat(FinishEnvelopeJob): add PDF burning with concurrency control
- Introduced PDFBurnerParams configuration for concurrency limit. - Added SemaphoreSlim to handle concurrent PDF burning for envelopes. - Updated job to call _mediator.BurnPdf for each envelope with error handling. - Preserved logging of job execution and envelope UUIDs.
This commit is contained in:
@@ -32,7 +32,7 @@ public static class BurnPdfCommandExtensions
|
||||
/// <param name="envelopeId"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<byte[]> BurnPdf(this ISender sender, int envelopeId, CancellationToken cancel)
|
||||
public static Task<byte[]> BurnPdf(this ISender sender, int envelopeId, CancellationToken cancel = default)
|
||||
=> sender.Send(new BurnPdfCommand(EnvelopeId: envelopeId), cancel);
|
||||
|
||||
/// <summary>
|
||||
@@ -42,7 +42,7 @@ public static class BurnPdfCommandExtensions
|
||||
/// <param name="envelopeUuid"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<byte[]> BurnPdf(this ISender sender, string envelopeUuid, CancellationToken cancel)
|
||||
public static Task<byte[]> BurnPdf(this ISender sender, string envelopeUuid, CancellationToken cancel = default)
|
||||
=> sender.Send(new BurnPdfCommand(EnvelopeUuid: envelopeUuid), cancel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user