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

Add RunInCurrentProcess task and enable in CollectionFactory, fixes #142, obsoletes #125 #159

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

geek-merlin
Copy link

@geek-merlin geek-merlin commented Nov 22, 2021

OPENEUROPA

Description

Running tasks from runner.yml creates a new process, with new config. It should not.
To keep BC, make it an option.

Change log

  • Added:
    • RunInCurrentProcess task
    • Add an optional "in-current-process: true" key that enables that behaviour.
    • Readme docs

runner.yml example

commands:
  foo:
    tasks:
      - task: run
        in-current-process: true
        command: "drupal:drush-setup"

@geek-merlin geek-merlin changed the title Add RunInCurrentProcess task and enable in CollectionFactory Add RunInCurrentProcess task and enable in CollectionFactory, fixes #142, obsoletes #125 Nov 22, 2021
@geek-merlin
Copy link
Author

Manually tested and worksforme:

I changed all run tasks in a complex runner.yml custom command to run-in-current-proces. The custom command worked the same way as before, and exec time went down from 38sto 16s.

Of course this is only a heuristic, tests for edge cases are still needed.

@geek-merlin geek-merlin marked this pull request as ready for review November 22, 2021 16:53
@geek-merlin geek-merlin marked this pull request as draft November 22, 2021 21:30
@geek-merlin geek-merlin marked this pull request as draft November 22, 2021 21:30
@geek-merlin
Copy link
Author

Nope, i was too fast. Calling a custom command results in an endless loop, possibly due to global state.

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.

1 participant