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 a helper to disable process timeouts #8088

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

beryllium
Copy link
Contributor

This came about because Sculpin's blog skeleton was recently changed to use Composer to manage long running processes like yarn encore --watch and sculpin generate --watch. Shortly thereafter, it was observed that this triggered the 5 minute default Composer timeout.

It seemed unwise to set the entire Composer configuration to unlimited timeouts, and I felt that this narrower approach was potentially worthy of being included in Composer itself.

The helper can be included in custom script definitions by calling
"Composer\\Config::disableProcessTimeout".

Example:

{
  "scripts": {
    "watch": [
      "Composer\\Config::disableProcessTimeout",
      "vendor/bin/sculpin generate --watch --server"
    ]
  }
}

The helper can be included in custom script definitions by calling
"Composer\\Config::disableProcessTimeout".

Example:

{
  "scripts": {
    "watch": [
      "Composer\\Config::disableProcessTimeout",
      "vendor/bin/long-running-script --watch"
    ]
  }
}
@alcohol
Copy link
Member

alcohol commented Apr 9, 2019

But as discussed in #8041, you could just composer run-script --timeout=0 watch

@Seldaek
Copy link
Member

Seldaek commented Apr 9, 2019

Ah well, this is a pretty clever hack, which really doesn't add much code, so 👍 from me.

@Seldaek Seldaek added this to the 1.9 milestone Apr 9, 2019
@Seldaek Seldaek added the Feature label Apr 9, 2019
@Seldaek Seldaek merged commit 8ac401b into composer:master Apr 9, 2019
@beryllium beryllium deleted the disable-process-timeout-helper branch April 9, 2019 08:50
@beryllium
Copy link
Contributor Author

Thanks! :)

@sakshamsaxena
Copy link

@beryllium Would you mind adding this to docs as well ? 😅

@beryllium
Copy link
Contributor Author

@sakshamsaxena For sure, just created #8093 for this.

@Antnee
Copy link

Antnee commented Jul 25, 2019

Do we have an ETA for when this will be launched, @Seldaek? This has been a feature that we've been looking forward to for many months. Thanks

@Seldaek
Copy link
Member

Seldaek commented Jul 31, 2019

@Antnee hoping to release friday, sorry it's been so long between minor releases but #life

@Antnee
Copy link

Antnee commented Jul 31, 2019

That's awesome, thanks @Seldaek

@Seldaek
Copy link
Member

Seldaek commented Aug 2, 2019

1.9 is out

@Antnee
Copy link

Antnee commented Aug 2, 2019

Yes! Thanks @Seldaek!

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

Successfully merging this pull request may close these issues.

None yet

5 participants