简体   繁体   English

AWS DataPipeline:SellCommandPrecondition不会失败

[英]AWS DataPipeline: SellCommandPrecondition does not fail

Using ShellCommandPrecondition for a SQLActivity with Datapipeline. 将ShellCommandPrecondition与Datapipeline一起用于SQLActivity。 In the python script, if I use sys.exit(0) (success signal) then the Precondition returns successfully and pipeline continues to execute. 在python脚本中,如果我使用sys.exit(0)(成功信号),则前提条件成功返回,并且管道继续执行。 But if I use sys.exit(1) (error signal) then the Precondition does not return and stays in Running state indefinitely. 但是,如果我使用sys.exit(1)(错误信号),则前提条件不会返回,并且会无限期地保持在“运行”状态。

But with SellCommandActivity, if I use sys.exit(1) then it fails gracefully and following activities fail. 但是使用SellCommandActivity,如果我使用sys.exit(1),则它会正常失败,并且后续活动也会失败。

Why ShellCommandPrecondition does not exhibit same behavior as SellCommandActivity or is this is a bug in AWS Datapipeline and needs to rectified? 为什么ShellCommandPrecondition不会表现出与SellCommandActivity相同的行为,或者这是AWS Datapipeline中的错误并且需要纠正?

The three properties to look at are: 要查看的三个属性是:

  • maximumRetries
  • retryDelay
  • preconditionTimeout

If your script fails (with a non-zero return code) on the first attempt, the precondition will not immediately fail. 如果您的脚本在第一次尝试时失败(返回码为非零),那么前提条件不会立即失败。 Instead it will pause for retryDelay and execute again up to maximumRetries . 相反,它将暂停retryDelay并再次执行到maximumRetries The total amount of time the precondition will allow for all attempts is determined by preconditionTimeout . 前提条件允许所有尝试的总时间由preconditionTimeout确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM