【发布时间】:2017-07-26 12:38:06
【问题描述】:
我需要一些想法如何完成这项任务。
我有一个带有推送状态的数据库,名为“pushStatus”的表,字段为“id、send、delivered”
-
服务器在 ios 或 android 上发送推送通知,然后设置 pushStatus.id 和 pushStatus.sent = true
-
手机接收到这个推送并发送回调到服务器关于推送已传递找到 pushStatus.id 和 pushStatus.delivered = true
没关系,但如果在 10 秒内推送 未发送,我需要发送短信 如何在 NodeJS 或 PHP
上做到这一点-----------------UPD------------------
我想用setTimeout(sendSMS, 10000);的nodeJS然后在func sendSMS检查pushStatus.delivered如果没有,调用API服务发送短信,但是在这种情况下高负载怎么样?
【问题讨论】: