vendor/codeages/biz-framework/src/Provider/QueueServiceProvider.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Codeages\Biz\Framework\Provider;

use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Codeages\Biz\Framework\Queue\Driver\SyncQueue;
use Codeages\Biz\Framework\Queue\JobFailer;
use Codeages\Biz\Framework\Queue\Command\WorkerCommand;
use Codeages\Biz\Framework\Queue\Command\TableCommand;

class QueueServiceProvider implements ServiceProviderInterface
{
    public function register(Container $biz)
    {
        $biz['autoload.aliases']['Queue'] = 'Codeages\Biz\Framework\Queue';
        $biz['console.commands'][] = function () use ($biz) {
            return new WorkerCommand($biz);
        };
        $biz['console.commands'][] = function () use ($biz) {
            return new TableCommand($biz);
        };

        $biz['queue.failer'] = function ($biz) {
            return new JobFailer($biz->dao('Queue:FailedJobDao'));
        };

        $biz['queue.connection.default'] = function ($biz) {
            return new SyncQueue('default', $biz, $biz['queue.failer']);
        };
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。