-
Notifications
You must be signed in to change notification settings - Fork 301
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
Pass a custom variable to flush() #358
Comments
any ideas? |
I'm unsure I understand the underlying problem here. If you are able to access your own variables when calling I know this is old, but the issue is not closed so apparently still an issue |
I think it was about connecting our internal user IDs directly with the push notifications without having to get this information from the database within the loop for each notification. With a large number of outgoing notifications, this would mean a lot of extra database queries inside the loop I don't have direct access to the code right now and because it was a while ago, I'm not 100% sure whether the problem was more extensive. But basically it was about making our own information available for each notification inside the loop |
Okay, I think I get what you mean because I'm encountering the same issue. I end up using the endpoint to find the user 😁 |
If you send a large number (thousands) of notifications at the same time, it is a big overhead if you have to get the data from the database for each user. It would therefore be better if you had a way to have the required data available directly in $report |
We are using the following simple code to flush the Queue:
foreach( $webPush->flush() as $report ){ .... }
The problem is, we need our own variables (the UserID) inside the loop. Is there a way to pass custom variables into the loop? Maybe so that it is available in $report
The text was updated successfully, but these errors were encountered: