承接 fusonic/sentry-cron 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fusonic/sentry-cron

Composer 安装命令:

composer require fusonic/sentry-cron

包简介

Automatic Sentry Cron check-ins with Symfony Scheduler

README 文档

README

License Latest Version Total Downloads php 8.2+

About

Automatically register scheduled events from Symfony Scheduler in Sentry Cron. Only cron expressions are supported.

Install

Use composer to install the library from packagist.

composer require fusonic/sentry-cron

Configuration

Fusonic\SentryCron\SentrySchedulerEventSubscriber:
    arguments:
        $enabled: true

Usage

Any regular event that is triggered with a cron expression can be used.

Event Configuration

By default, the Sentry defaults are used for monitor configurations. Per event, you can configure an attribute to use your own configuration:

use Fusonic\SentryCron\SentryMonitorConfig;

#[SentryMonitorConfig(checkinMargin: 30, maxRuntime: 30, failureIssueThreshold: 5, recoveryThreshold: 5)]
class SomeEvent {
    // ...
}

Async Events

If you have an unpredictable longer-running scheduled task, you can manually check in by implementing AsyncCheckInScheduleEventInterface.

The scheduled event:

use Fusonic\SentryCron\SentryMonitorConfig;
use Fusonic\SentryCron\AsyncCheckInScheduleEventInterface;
use \Fusonic\SentryCron\AsyncCheckInScheduleEventTrait;

class SomeEvent implements AsyncCheckInScheduleEventInterface {
    use AsyncCheckInScheduleEventTrait;
    
    // ...
}

The manual check in:

class SomeEventHandler {
    private const BATCH_SIZE = 100;
    
    public function __invoke(SomeEvent $event): void {
        $offset = 0;
        
        // e.g.: some slow database processing
        $entitiesToProcess = // ...
        
        $nextEvent = new SomeEvent(offset: $offset + self::BATCH_SIZE);
        
        if (count($entitiesToProcess) === 0) {
            $nextEvent->markAsLast();
        }
        
        $this->eventBus->dispatch($nextEvent);
    }

}

统计信息

  • 总下载量: 3.56k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固