distributor icon indicating copy to clipboard operation
distributor copied to clipboard

Return response from distribution request

Open aahovhannisyan opened this issue 5 years ago • 5 comments

We're using distributor in background and calling \Distributor\Subscriptions\send_notifications directly. As the function doesn't return any value, we're not able to get information about the distributed post. Is it possible to return the response of the request from this function, so we can know whether it was distributed successfully or not ? https://github.com/10up/distributor/blob/develop/includes/subscriptions.php#L280

aahovhannisyan avatar Feb 14 '20 11:02 aahovhannisyan

@armdev17 thanks again for the feedback. If you're able to work on a PR for this, then we can get it through code review and let you know if we have any questions or concerns.

jeffpaul avatar Feb 19 '20 05:02 jeffpaul

I'll work on a pull request to resolve this.

aahovhannisyan avatar Feb 20 '20 06:02 aahovhannisyan

We will try to have some progress on this one in near future. @jeffpaul @dinhtungdu you can find my thoughts here https://github.com/NovemBit/distributor/issues/18 , your feedback will be very useful for us.

Is this something that will helpful others, have you ever noticed timeouts or other issues with sending updates via external connections?

arsendovlatyan avatar Mar 26 '20 16:03 arsendovlatyan

@arsendovlatyan I think being able to capture sites that succeeded and failed is useful, whether that happens via the solution noted or in a different manner should be discussed. We're currently working to finish up the v2.0 release, but will come back to this topic when we're assessing what to milestone for the v2.1 release. In the meantime, if you have any other details on the problem and proposed solution then please note that... thanks!

jeffpaul avatar Mar 26 '20 18:03 jeffpaul

I know there has been some work done in a separate PR (#417) however, that PR seemed to be stale. PR #1043 tries to simply add hooks w/ the currently available information. It solves an issue we currently have between dt_push_post being called vs when a subscription is pushed.

I understand this implementation doesn't have all the data dt_push_post (Network or External) has it does at least allow access to allow developers to interact w/ post subscription.

If 2.0 work is being done to address hooks for subscriptions feel free to close this PR

aaronware avatar Apr 06 '23 13:04 aaronware