-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support for multiple machines #4
Comments
On the job creation side of things, these are just the default settings; to change that, you can specify the alternatives via Injector:
GearmanService:
host: myhostname
port: 1234 As for running jobs, for your specific use-case, I'm not sure that either of the example
In any case, it's likely you'll want to create your own runner.php script with appropriate config details for which gearman server to connect to for listening for jobs. The current scripts at present aren't really generic enough at present. |
Thanks, setting the server info via Injector works great. The gearman_runner.php seems to work for my needs, if I change the $worker->addServer call to contain the server data. I think it would be nice to pass the server data as parameters to the runner. I saw that you copy the first argument to the get parameter 'url' in line 47. Is there any reason for this? |
Just in case someone is looking for a way to do this... I changed the
In the
Same could be done with the port, if needed. |
From what I can tell the gearman server config is currently hard coded to be localhost:4730 in multiple places. I would like to use this module (and silverstripe-queuedjobs) in a setup where we:
I guess the solution would be to move the server config to the config system / yml. Maybe allow to pass it as parameters to the runner script.
Is this correct and if yes would you be interested in a pull request for those changes?
The text was updated successfully, but these errors were encountered: