<div dir="ltr">Yes. It is a bug and should be done before line 119:  <span class="" style="color:rgb(153,153,153);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">self</span><span class="" style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">.</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">_do_task_action</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">(</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">db_task</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">)</span>. It can definitely lead to bugs especially since _do_task_action itself updates the status.<div>
<div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 8:46 PM, W Chan <span dir="ltr"><<a href="mailto:m4d.coder@gmail.com" target="_blank">m4d.coder@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">In addition, for sync tasks, it'll overwrite the task state from SUCCESS to RUNNING.</div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 8:41 PM, Dmitri Zimine <span dir="ltr"><<a href="mailto:dz@stackstorm.com" target="_blank">dz@stackstorm.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">My understanding is: it's the engine which finalizes the task results, based on the status returned by the task via convey_task_result call. <div>

<br></div><div><a href="https://github.com/stackforge/mistral/blob/master/mistral/engine/abstract_engine.py#L82-L84" target="_blank">https://github.com/stackforge/mistral/blob/master/mistral/engine/abstract_engine.py#L82-L84</a></div>

<div><a href="https://github.com/stackforge/mistral/blob/master/mistral/engine/scalable/executor/server.py#L44-L66" target="_blank">https://github.com/stackforge/mistral/blob/master/mistral/engine/scalable/executor/server.py#L44-L66</a></div>

<div><br></div><div>In case of async tasks, executor keeps the task status at RUNNING, and a 3rd party system will call convey_task_resutls on engine. </div><div><br></div><div><blockquote type="cite"><div dir="ltr"><a href="https://github.com/stackforge/mistral/blob/master/mistral/engine/scalable/executor/server.py#L123" target="_blank">https://github.com/stackforge/mistral/blob/master/mistral/engine/scalable/executor/server.py#L123</a>,</div>

</blockquote><br></div><div>This line however looks like a bug to me:  at best it doesnt do much and at worst it overwrites the ERROR previously set in here <span style="white-space:pre-wrap"><a href="http://tinyurl.com/q5lps2h" target="_blank">http://tinyurl.com/q5lps2h</a> </span></div>

<div><br></div><div>Nicolay, any better explanation?</div><div><br></div><div><br></div><div>DZ> </div><div><div><br><div><div><div><div>On Mar 26, 2014, at 6:20 PM, W Chan <<a href="mailto:m4d.coder@gmail.com" target="_blank">m4d.coder@gmail.com</a>> wrote:</div>

<br></div></div><blockquote type="cite"><div><div><div dir="ltr"><div>Regarding <a href="https://github.com/stackforge/mistral/blob/master/mistral/engine/scalable/executor/server.py#L123" target="_blank">https://github.com/stackforge/mistral/blob/master/mistral/engine/scalable/executor/server.py#L123</a>, should the status be set to SUCCESS instead of RUNNING?  If not, can someone clarify why the task should remain RUNNING?</div>


<div><br></div><div>Thanks.</div><div>Winson</div><div><br></div></div></div></div>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>

</blockquote></div><br></div></div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>