Git Product home page Git Product logo

yii2-queue-backend's Introduction

yii2 queue-backend module

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Code Coverage Build Status StyleCI

This is a background for yii-queue, there are queue statistics, temporary support redis driver

Install by Composer

composer install graychen/yii2-queue-backend

Migrate database

add migrationPath in console file

'controllerMap' => [
    'migrate' => [
        'class' => 'yii\console\controllers\MigrateController',
        'migrationPath' => [
             '@graychen/yii2/queue/backend/migrations'
        ],
    ],
],

run migration

yii migrate/up --migrationPath=@graychen/yii2/queue/backend/migrations

For Backend Module

Config module in config file

'queue' => [
    'class' => 'graychen\yii2\queue\backend\Module',
]

after that, visit https://localhost/admin/queue/default

image

ChangeLog

changelog

yii2-queue-backend's People

Contributors

graychen avatar zacksleo avatar

Stargazers

33kuai avatar yien avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

zacksleo

yii2-queue-backend's Issues

排序错误

默认排序时间, 应该是created_at, queue_id不对, 如果队列被清空了, 就会出错

增加错误记录功能

  1. 增加一个log字段,用于记录执行过程中发的错误信息,方便查看
Yii::$app->queue->on(Queue::EVENT_AFTER_ERROR, function (ErrorEvent $event) {
    if ($event->job instanceof \graychen\yii2\queue\backend\jobs\ BaseObject) {
        $model = Queue::findOne(['queue_id'=>$event->id]);
        $model->log = $event->error;
        $model->save();
    }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.