Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested chains not running #133

Merged
merged 1 commit into from
Apr 10, 2017

Conversation

davidgrayston
Copy link
Contributor

@davidgrayston davidgrayston commented Jan 10, 2017

We are having problems running chains that call other chains. I believe this is because the ConsoleEvents::TERMINATE event is only fired once, which means the CallCommandListener only calls the top level chains in the ChainQueue.

I have updated the code to call commands directly rather than add them to the ChainQueue as this fixes the issue, however, it doesn't seem to be the correct approach.

I think you will have a better understanding of the issue and may be able to get this working with the CallCommandListener processing ChainQueue.

Here is an example of chains being nested:
drupal test:main

chain-test-main.yml

command:
  name: test:main
  description: 'Example of a chain calling another chain with placeholders'
commands:
  - command: test:child
    options:
      placeholder:
        - 'project:%{{project|main-project}}'
        - 'directory:main-dir'

chain-test-child.yml

command:
  name: test:child
  description: 'Example of chain that is called by another chain'
commands:
  - command: exec
    arguments:
      bin: 'echo "This is a test: Project:%{{project|foo}} Directory:%{{directory|bar}}"'

@jmolivas jmolivas merged commit 3895bd3 into hechoendrupal:master Apr 10, 2017
@jmolivas
Copy link
Member

@davidgrayston Thanks for your contribution, your PR was merged. This will be included on the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants