Merge pull request #118 in YUNIONIO/onecloud from ~LIZEXI/onecloud:bugfix/lzx-parent-task-failed-reason to release/2.0.0

* commit '2914e880af453cf59f793216268dbc5f0ddfe562':
  fix: NotifyParentTaskFailure reason
This commit is contained in:
邱剑
2018-08-25 14:40:02 +08:00
+1 -1
View File
@@ -538,7 +538,7 @@ func (self *STask) NotifyParentTaskFailure(ctx context.Context, reason string) {
if len(reason) > 100 {
reason = reason[:100] + "..."
}
body.Add(jsonutils.NewString(fmt.Sprintf("Subtask %s failed: %s", self.TaskName, reason)))
body.Add(jsonutils.NewString(fmt.Sprintf("Subtask %s failed: %s", self.TaskName, reason)), "__reason__")
self.NotifyParentTaskComplete(ctx, body, true)
}