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

我想问一下如果任务特别耗时,等待响应会超时吗 #100

Open
tangxiaoqi-tangxiao opened this issue Jan 11, 2023 · 4 comments

Comments

@tangxiaoqi-tangxiao
Copy link

如果我的任务需要执行一个小时,应该怎么处理的呢

@tangxiaoqi-tangxiao
Copy link
Author

因为我看这个项目是通过定时请求api来实现定时任务,那api长时间无响应,是会一直等待还是怎么处理

@hd2y
Copy link

hd2y commented Jan 16, 2023

看了下代码没用 HttpClientFactory,那就没办法灵活的注入配置了,建议还是 Fork 下来改一下再用吧。

https://github.com/zhaopeiym/quartzui/blob/d1f5d7ed85593b9f2a78fdf107eb2844e01fbdb7/QuartzNetAPI/Host/Common/HttpHelper.cs

@huangyedie
Copy link

这种长时间的api,建议还是使用调度的方式来执行,可以使用这个调度器来定时创建任务,由后台代码执行此调度创建出的任务。

@huangyedie
Copy link

如果我的任务需要执行一个小时,应该怎么处理的呢

前端会返回超时,但是后台还会在执行

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

3 participants