You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yangsai@163.com
cf3d792c05
|
6 months ago | |
---|---|---|
.. | ||
notice | 6 months ago | |
AgentJob.php | 6 months ago | |
AutoCommentJob.php | 6 months ago | |
CheckQueueJob.php | 6 months ago | |
LiveJob.php | 6 months ago | |
MiniOrderJob.php | 6 months ago | |
OrderCreateAfterJob.php | 6 months ago | |
OrderExpressJob.php | 6 months ago | |
OrderJob.php | 6 months ago | |
OtherOrderJob.php | 6 months ago | |
OutPushJob.php | 6 months ago | |
PinkJob.php | 6 months ago | |
PosterJob.php | 6 months ago | |
ProductCopyJob.php | 6 months ago | |
ProductLogJob.php | 6 months ago | |
ProductStockJob.php | 6 months ago | |
README.md | 6 months ago | |
RefundOrderJob.php | 6 months ago | |
TakeOrderJob.php | 6 months ago | |
TaskJob.php | 6 months ago | |
TemplateJob.php | 6 months ago | |
TranslateJob.php | 6 months ago | |
UnpaidOrderCancelJob.php | 6 months ago | |
UnpaidOrderSend.php | 6 months ago | |
UpgradeJob.php | 6 months ago | |
UserJob.php | 6 months ago | |
filetree.txt | 6 months ago |
README.md
crmeb/app/jobs目录是CRMEB项目队列任务类的代码目录。
队列任务在项目开发中有以下几个重要作用:
-
异步处理。可以将一些耗时较长的任务放入队列以异步处理,不阻塞主线程。
-
延迟处理。可以指定队列任务在一定时间后异步执行,比如发送短信或邮件。
-
分布处理。可以将队列任务分布到不同服务器进行处理,提高服务器使用效率。
此目录下主要包含以下内容:
-
每个任务类对应一个业务任务,实现Job接口。
-
任务类内定义具体任务业务逻辑,如发送短信/邮件等。
-
通过Broker进行任务的发送和异步处理。
-
支持任务延时、失败重试等功能。
使用队列可以使得项目性能更优:
-
阻塞任务剥离出来异步执行。
-
分布式下每个任务独立运行,不阻塞其他进程。
-
通过Broker复用同一服务,且伸缩性好。
所以此目录负责项目中所有异步任务的编写和调度,起到优化系统性能和扩展能力的重要作用。