sebbmeyer / php-microsoft-teams-connector

PHP Microsoft Teams Connector
MIT License
111 stars 22 forks source link

CURL Timeouts #15

Closed IsaacInsoll closed 3 years ago

IsaacInsoll commented 4 years ago

Hi, I send about 20 notifications a day and get this error probably 10% of the time. It's no big deal as I save the notifications to the DB and have a cron task to ship one notification every minute so I don't get rate limited.

The problem is that sometimes this message still gets posted to teams even though the operation timed out so then I do a resend the next minute and there are duplicate notifications.

Is there some way to tell if the message was actually sent or not?

Thanks

ERROR [UNKNOWN TYPE, ERRNO 28]: Uncaught Exception: Operation timed out after 10001 milliseconds with 0 bytes received IN GET dev/cron Line 47 in /home/isaac/public_html/nookins/vendor/sebbmeyer/php-microsoft-teams-connector/src/TeamsConnector.php Source ====== 38: ])

sebbmeyer commented 4 years ago

As far as I know, no there is no other way to tell if the message was send. You could try to extend the TeamsConnector class and increase the timeout option to check if maybe 15 or 20 seconds would reduce the errors.

Maybe I could extract the options from the send function to make it easier to override them