百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

LongRunning

> 编程语言
开源

用于所有长时间运行的项目的 Mono 仓库

191 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于所有长时间运行的项目的 Mono 仓库

LongRunning

This is the LongRunning mono repository for the following packages:

  • core
  • doctrine-orm
  • sentry

Installation

:warning: Instead of installing this mono repository we recommend you to install the sub packages instead. See above.

composer require long-running/long-running

Symfony

If you are using Symfony, make sure to enable the bundle:

php
 ['all' => true],
];

How to use?

php
cleanUp();
}

If you are using Symfony, any service that implements the LongRunning\Core\Cleaner interface will be autoconfigured and added to the LongRunning\Core\DelegatingCleaner.

The LongRunning\Core\DelegatingCleaner is aliased to LongRunning\Core\Cleaner.

That means that you can inject the LongRunning\Core\Cleaner service in your worker and it will call all configured cleaners on cleanUp():

php
cleaner = $cleaner;
    }

    public function doWork() : void
    {
        while (true) {
            // Do heavy work, like processing jobs from a queue
            echo "Doing heavy work";
            sleep(1);
            echo "Done with heavy work";

            // Cleanup things
            $this->cleaner->cleanUp();
        }
    }
}

Existing cleaners

LongRunning provides 2 packages that add additional cleaners:

  • doctrine-orm
  • sentry

Upgrading

If you are coming from LongRunning 0.5.0 please refer to UPGRADING.md.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPphp

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言