如何从Azure管道中长期运行的webjob获得响应 [英] How to get response from a long running webjob in a azure pipeline

查看:74
本文介绍了如何从Azure管道中长期运行的webjob获得响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行长期运行的控制台应用程序的网络作业.我正在使用WebAvtivity在Azure管道中运行相同的内容,并且管道中接下来还有一个依赖的Web作业.当我启动管道时,第一个作业响应202并移至下一个作业,而我希望它等待直到第一个作业完成.

I have a web-job running a long-running console application. I am using the WebAvtivity to run the same in an Azure Pipeline and there is a dependant web-job next in the pipeline. When I am starting the pipeline the first job responses 202 and moves to next whereas I want it to wait till the first gets completed.

有没有办法等到我对第一个Web作业收到200个民意测验答复以检查状态?

Is there a way to wait till I get 200 response of poll to the first web job to check the status?

感谢您的任何帮助!

推荐答案

您可能希望分享触发WebJob函数的方式,以便其他人提供帮助.

You may want to share how you are triggering the WebJob function in order for others to help.

我建议您看一下任务"

I would suggest to look at the tasks "Invoke REST API" or "Invoke Azure Function"

这些任务是针对您正在寻找的需求类型而构建的,因为我猜您的WebJob正在使用HTTP触发器.

Those tasks are built for the type of needs you are looking for as I guess your WebJob is using HTTP triggers.

然后您可以解析响应或使用回调.

You then can either parse the response or use a callback.

这篇关于如何从Azure管道中长期运行的webjob获得响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆