GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - liukelin/php_task_queue: 自用。一个用PHP,基于redis的简单易用的异步任务处理demo

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
demo
demo
 
 
logs
logs
 
 
parsley
parsley
 
 
README.md
README.md
 
 
config.php
config.php
 
 
demo.php
demo.php
 
 
func.php
func.php
 
 
startup.php
startup.php
 
 

Repository files navigation

一个用PHP开发的,使用redis的任务队列

注: 队列的生产、

消费(拉取方式)、

消费确认、

消费失败回队(回队策略)、

多端生产、

多段消费(避免资源竞争)

自定义队列(多队列)

多进程消费(auto队列数量?)


end...


1.配置config.php

2.将/parsley/parsley.php 引入到你的项目

3.将你需要执行的方法写在func.php (保证可在文件中直接运行)

4.将startup.php 加入到crontab. ( * * * * * /usr/bin/php /你的项目路径/startup.php )

5.
//apply_async(方法名,方法参数array);
include_once('parsley/parsley.php');
$c = new parsley();
$c->apply_async('test',array($i,$i));

   这是一个各消费从队列领取式的任务分配(也有接收端分配到进程处理方式)
   目前项目只体现了队列使用的基本概念,后续将会增加。
   多进程(接收任务进程、处理任务进程)
   任务(进程)运行状态监控,提供web界面查看各个任务进程的状态,查询具体任务的分配情况,提供个进程处理的统计
   控制台基本操作,如:kill进程等。
   日志收集,报警 (elk static)
   多服务器。
   
   不排除使用其他语言辅助。。。
   
   任重道远。。。

end...

About

自用。一个用PHP,基于redis的简单易用的异步任务处理demo

Resources

Readme
Activity

Stars

15 stars

Watchers

1 watching

Forks

8 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.