duanba8070 2012-03-03 00:05
浏览 28
已采纳

没有CRON或Shell的队列功能

I am developing a system with Symfony which has a notification module integrated into it. The purpose of the script is to allow for a wide range of compatibility, and as such the requirements would leave cron, root & shell out of the question.

Currently, the system sends notifications when specific actions are executed. For example, making a post, uploading a file, changing a status, ect. The problem with this approach is that it can cause certain actions to be very slow if there is a substantial number of users with notification subscriptions.

My question is - are there any solutions that would allow me to queue and defer this notification task until after the action has been executed? Thereby eliminated any lag connected to large email tasks.

Thanks in advance for your help - much appreciated!

  • 写回答

1条回答 默认 最新

  • douxia1988 2012-03-03 01:33
    关注

    As I recall, WordPress solves this issue by passing some javascript code to the client that with make an AJAX call to the server to execute the long running process. The AJAX call is asynchronous so it is non-blocking and doesn't affect page load times.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?