将任务添加到正在运行的Azure批处理作业并手动控制终止 [英] Add Tasks to a running Azure batch job and manually control termination

查看:105
本文介绍了将任务添加到正在运行的Azure批处理作业并手动控制终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Azure批处理作业,它使用一些非常大的文件,这些文件是异步上传到Azure Blob存储的,这样我们就不必等待所有文件上传就可以开始由一组集合组成的批处理作业。将处理每个文件并生成输出的任务。到目前为止一切都很好-一切正常。

We have an Azure-batch job that uses some quite large files which we are uploading to Azure Blob storage asynchronously so that we don't have to wait for all files to upload before starting our batch job made up of a collection of Tasks that will process each file and generate output. All good so far - this is working fine.

我希望能够创建Azure任务并将其添加到现有的运行Azure作业中,从而增加了长度任务列表中的内容,但我找不到执行该操作的方法。似乎Azure希望您在任务开始之前定义该任务的所有任务,然后运行直到所有任务完成并终止该任务(这在某些情况下是有意义的,但对我来说不是)。

I'd like to be able to create an Azure Task and Add it to an existing, running Azure Job increasing the length of the Task list but I cant find how to do this. It seems that Azure expects you to define ALL jobs for a Task before the Job starts and then it runs until all tasks are complete and terminates the job (which makes sense in some scenarios - but not mine).

我想抑制此作业完成行为,并能够将同一作业的其他Azure任务排队。然后,我可以(通过任务)监视Azure作业的状态,并确定自己作业是否完成。

I would like to suppress this Job completion behavior and be able to queue up additional Azure Tasks for the same job. I could then monitor the Azure Job status (via the Tasks) and determine myself if the Job is complete.

我们的问题是上传多MB文件需要时间,并且我们希望任务处理在第一个文件可用时立即开始。如果我们必须等到所有文件都可用之后,我们的处理开始就会延迟,这不是我们所需要的。

Our issue is that uploads of multi-MB files takes time and we want Task processing to start as soon as the first file is available. If we have to wait until all files are available, then our processing start is delayed which is not what we need.

我们可以为每个任务创建一个作业并进行管理它在我们的应用程序中是有点混乱,如果可能的话,我想使用封装的Azure Job实体和支持功能。

We 'could'create a job per task and manage it in our application but that is a little 'messy' and I would like to use the encapsulating Azure Job entity and supporting functionality if I possibly can.

有人这样做吗?并可以提供一些指导?

Has anyone done this and can offer some guidance? Many thanks?

推荐答案

您可以在 active 中将新任务添加到现有的Azure Batch作业中。 code>状态。 Azure批处理作业没有正在运行状态。您可以在此处找到Azure批处理作业状态的列表。

You can add new tasks to an existing Azure Batch job in the active state. There is no running state for an Azure Batch job. You can find a list of Azure Batch job states here.

Azure批处理作业默认情况下不会通过终止所有任务而自动完成。您可以查看与此相关的有关此主题的问题

Azure Batch Jobs, by default, do not automatically complete by terminating upon all tasks completing. You can view this related question regarding this subject.

这篇关于将任务添加到正在运行的Azure批处理作业并手动控制终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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