Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W
wiki-php
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • 互联网应用开发
  • wiki-php
  • Wiki
  • php job queue

php job queue · Changes

Page history
wangchangchun created page: php job queue authored Nov 22, 2019 by 王常春's avatar 王常春
Hide whitespace changes
Inline Side-by-side
Showing with 1 addition and 1 deletion
+1 -1
  • php-job-queue.md php-job-queue.md +1 -1
  • No files found.
php-job-queue.md
View page @ 92073493
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
## Job类 ## Job类
参考`Bin_Wiki_UpdateCertWebsiteExpire`.注意这里它即实现了生产者也实现了消费者逻辑,`start_general_queue`函数将需要执行的任务依次加入队列,`add_queue`则依次消费完成任务。 参考`Bin_Wiki_UpdateCertWebsiteExpire`.注意这里它即实现了生产者也实现了消费者逻辑,`start_general_queue`函数将需要执行的任务依次加入队列,`add_queue`则依次消费完成任务。
## Python队列脚本 ## Python队列脚本
python队列脚本在 python队列脚本在`job_queue_for_php.py`中,有2个参数。第一个指定队列名称,第2个为数组,指定并发执行进程数量。如`python job_queue_for_php.py sms 20`表示处理并发20个进程处理"pingan:python:queue:sms"队列中的数据。
## 任务加入队列 ## 任务加入队列
任务加入队列,就是加入redis的一个list队列,此处可以使用`GlobalFun::add_python_job($job_class, $args=[], $queue_name='default', $is_urgent=false)`. 任务加入队列,就是加入redis的一个list队列,此处可以使用`GlobalFun::add_python_job($job_class, $args=[], $queue_name='default', $is_urgent=false)`.
......
Clone repository
  • 360safeguardnativeapi
  • all new classmate
  • bind phone
  • code standard
  • deploy_sys
  • edit common
  • edit master
  • envrioment
  • find psw
  • front new classmate
  • front statck
  • git
  • Home
  • idcard md5
  • ide
View All Pages