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

Pull in old PRs from Chris's repo #7

Merged
merged 37 commits into from
Jan 6, 2019
Merged

Pull in old PRs from Chris's repo #7

merged 37 commits into from
Jan 6, 2019

Conversation

danhunsaker
Copy link
Member

@danhunsaker danhunsaker commented Dec 11, 2018

This PR consists entirely of changes submitted by PHP Resque users over the last several years. A small handful of PRs remain unpulled (chrisboulton/php-resque#35, chrisboulton/php-resque#81, chrisboulton/php-resque#338), but they're complex enough to deserve their own, separate PRs to this repo, so I've mentioned that to their creators (in the original PRs), and hopefully they'll bring them over here.

richardkmiller and others added 30 commits March 12, 2013 16:49
this facilitates monitoring of each worker process
…ow semver installs for development versions
…methods

`method_exists` will return true even if an object has a protected method; calling it from Resque will then fail. `is_callable` only returns true when the method both exists and can be called externally.
Chris's fork is outdated and unnecessary.
@danhunsaker danhunsaker self-assigned this Dec 11, 2018
@danhunsaker danhunsaker requested a review from a team December 11, 2018 07:56
@@ -217,7 +257,14 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false)
$this->logger->log(Psr\Log\LogLevel::INFO, $status);

// Wait until the child process finishes before continuing
pcntl_wait($status);
while (pcntl_wait($status, WNOHANG) === 0) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just about to start a fork to fix this issue as well!

However my fix was going to be registering the SIGTERM and SIGINT signals in registerSigHandlers with the restart_syscalls parameter set to false, allowing the handlers to be triggered.

Having said that, my knowledge of PHP and forking is quite limited and the documentation on pcntl_signal and the restart_syscalls parameter is slim. So changing pcntl_wait might actually be preferred over my fix. If not, let me know and I can create a PR for it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say pull this branch down and give it a test. See if the current fix is sufficient. If not, toss us a PR with your changes as well, and we'll add them, too!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done so and can confirm this change is working as expected, so no need for additional changes!

@Micr0mega
Copy link

So what is the plan for having these reviewed? Can't wait for a new release ;-)

@danhunsaker
Copy link
Member Author

Just waiting for somebody on the PHP Resque team (@resque/php) who isn't myself to submit a review. Can't review my own PRs! (GitHub literally doesn't allow it...) Once that's done, merging will be pretty quick!

@danhunsaker
Copy link
Member Author

In the absence of reviews from the @resque/php team, I'm overriding the requirement, as a repo admin, for a review, and merging this now. It will go to the develop branch, not the master branch, so folks will have a chance to test it properly (gonna tag it with a -beta flag, so you need to enable @dev stability for this) before it gets tagged as a stable release. Please submit feedback here!

@danhunsaker danhunsaker merged commit 1bd2df2 into develop Jan 6, 2019
@danhunsaker danhunsaker deleted the old-pulls branch January 6, 2019 06:19
@Micr0mega
Copy link

Deployed this two days ago where it would have little impact if broken. It has been running at least a job per minute, not a single problem so far 👍

On different note, when I follow the link in the @resque/php mentions, I get a 404. Maybe this is related to nobody responding to the call for review?

@danhunsaker
Copy link
Member Author

You mean the link to the team itself? Or something else?

@Micr0mega
Copy link

You mean the link to the team itself? Or something else?

The former, when referencing the team in your previous comments here. For example:

In the absence of reviews from the @resque/php team, I'm overriding the requirement, as a repo admin, for a review, and merging this now. It will go to the develop branch, not the master branch, so folks will have a chance to test it properly (gonna tag it with a -beta flag, so you need to enable @dev stability for this) before it gets tagged as a stable release. Please submit feedback here!

@resque/php links to https://github.com/orgs/resque/teams/php, but that's a 404 for me. So I was thinking they might not have received any notification about your request to review, because something is wrong with the team. Might be completely wrong though :) I cannot seem to reproduce the reference in a comment either, so I don't know how it works.

@danhunsaker
Copy link
Member Author

danhunsaker commented Jan 9, 2019

Ah. Must mean the team is private. Interesting they've opted to 404 those rather than 403, but ¯\_(ツ)_/¯ I guess.

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

Successfully merging this pull request may close these issues.