gpt4 book ai didi

amazon-web-services - 有没有办法在AWS Batch作业上设置挂牌时间?

转载 作者:行者123 更新时间:2023-12-04 08:19:31 25 4
gpt4 key购买 nike

有没有一种方法可以设置AWS Batch作业(或队列)的最大运行时间?这是大多数批处理管理器中的标准设置,可以避免由于任何原因挂起作业时浪费资源。

最佳答案

自2018年4月起,AWS Batch现在支持在提交作业时或在作业定义中设置Job Timeout

https://aws.amazon.com/about-aws/whats-new/2018/04/aws-batch-adds-support-for-automatic-termination-with-job-execution-timeout/

You specify an attemptDurationSeconds parameter, which must be at least 60 seconds, either in your job definition, or when you submit the job. When this number of seconds has passed following the job attempt's startedAt timestamp, AWS Batch terminates the job. On the compute resource, your job's container receives a SIGTERM signal to give your application a chance to shut down gracefully; if the container is still running after 30 seconds, a SIGKILL signal is sent to forcefully shut down the container.



资料来源: https://docs.aws.amazon.com/batch/latest/userguide/job_timeouts.html
POST /v1/submitjob HTTP/1.1
Content-type: application/json

{
...
"timeout": {
"attemptDurationSeconds": number
}
}

关于amazon-web-services - 有没有办法在AWS Batch作业上设置挂牌时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47388435/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com