Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing cancellationToken to RenderAsync does nothing #10

Open
shai-glat opened this issue Apr 28, 2019 · 1 comment
Open

passing cancellationToken to RenderAsync does nothing #10

shai-glat opened this issue Apr 28, 2019 · 1 comment

Comments

@shai-glat
Copy link

Hello,
I am using JSReport as web server in my Asp.Net Core app, and everything seems to be working great. My problem is i have a cancellation token i pass and RenderAsync seems to ignore it. Any idea what can cause this?

JSReport initialization in startup:
var js = new LocalReporting() .UseBinary(reportingBinary) .Configure(c => { c = c.CreateSamples(); c.HttpPort = 12121; c.Chrome = new ChromeConfiguration {Timeout = 10000000}; return c; }) .KillRunningJsReportProcesses() .AsWebServer() .Create(); services.AddJsReport(js);
Usage of JSReport:
var template = new Template { Content = await GenerateTemplate(templateName, model), Engine = Engine.None, Recipe = Recipe.ChromePdf, Chrome = new Chrome { Landscape = false } }; var report = await _jsReportMvcService.RenderAsync(new RenderRequest { Template = template,Options = new RenderOptions { Timeout = 10000000 } }, _token);
NOTE: When RenderAsync() is called, _token is already cancelled.

@pofider
Copy link
Contributor

pofider commented May 2, 2019

Do you see anything wrong with this code? We pass the cancelation token to the http client, so it seems to be fine.
https://github.com/jsreport/jsreport-dotnet-client/blob/master/jsreport.Client/ReportingService.cs#L170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants