Skip to content

Commit

Permalink
Revert Set initial event number for async ansible commands oVirt#499
Browse files Browse the repository at this point in the history
  • Loading branch information
mnecas committed Jun 28, 2022
1 parent fd071c7 commit 3c101d7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void doPolling(Guid cmdId, List<Guid> childCmdIds) {
// Process the events if the playbook is running:
totalEvents = runnerClient.getTotalEvents(playUuid);

if (msg.equalsIgnoreCase("running") || totalEvents == 0 || msg.equalsIgnoreCase("successful")
if (msg.equalsIgnoreCase("running") || msg.equalsIgnoreCase("successful")
&& command.getParameters().getLastEventId() < totalEvents) {
command.getParameters().setLastEventId(runnerClient.processEvents(
playUuid, command.getParameters().getLastEventId(), fn, msg, ret.getLogFile()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ protected void executeCommand() {
} else {
getParameters().setPlayUuid(ansibleReturnValue.getPlayUuid());
getParameters().setLogFile(ansibleReturnValue.getLogFile().toString());
getParameters().setLastEventId(ansibleReturnValue.getLastEventId());
persistCommand(getParameters().getParentCommand(), true);
setSucceeded(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class AnsibleCommandParameters extends ActionParametersBase {
public AnsibleCommandParameters() {
super();
this.playUuid = UUID.randomUUID().toString();
this.lastEventId = 0;
}

public int getLastEventId() {
Expand Down

0 comments on commit 3c101d7

Please sign in to comment.