-
Notifications
You must be signed in to change notification settings - Fork 302
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 trigger_async method #4
Conversation
Add trigger_async method to allow asynchronous calls to the Pusher REST API using fsockopen instead of cURL. Also useful on shared hosts where cURL is not allowed/installed.
An async method would be really handy (and thanks for the earlier I'd really like to encourage tests to be submitted along with commits. It might be difficult to do since it touches some native functions. There's also a reasonable amount of duplicate code here from the p.s. drop me an email phil@pusher.com for some Pusher credit as thanks. |
@leggetter, is this good to merge? |
Doesn't look like it can be automatically merged any more. But, it is just one method so probably wouldn't be too difficult to copy & paste. The reasons I didn't pull this in are (as above); no tests and duplicate code from the Not sure why I didn't just merge locally and do the refactoring myself. Hopefully I was busy and not just lazy. Just spent a bit of time looking at this - which led me to set up stuff locally etc. etc. - and then when I got to this I noticed there also isn't a callback that states if the call fails/succeeds. So, if we want an
|
@leggetter Sounds like something I can have a go at. Would you ming reviewing the PR once I push it? |
@adamyeats No problem at all. Pleased to be part of the @pusher community. |
I was thinking of pushing all pusher event trigger calls to a resque queue. Any thoughts on that ? |
See #22 |
I don't understand how this can be asynchronous. From http://php.net/manual/en/function.fsockopen.php:
Searching for |
Add trigger_async method to allow asynchronous calls to the
Pusher REST API using fsockopen instead of cURL.
Also useful on shared hosts where cURL is not allowed/installed.