定制 kima92/expector-patronum 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kima92/expector-patronum

最新稳定版本:0.9.10

Composer 安装命令:

composer require kima92/expector-patronum

包简介

This is my package expector-patronum

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

ExpectorPatronum is a Laravel-based system designed to manage and monitor task expectations and actual performances. It includes features like task scheduling, real-time monitoring, and integration with calendar interfaces for effective visualization and management.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Requirements

  • PHP >= 8.2
  • Laravel >= 9.0
  • MySQL or a compatible database system

Installation

You can install the package via composer:

composer require kima92/expector-patronum

You can publish and run the migrations with:

php artisan vendor:publish --tag="expector-patronum-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="expector-patronum-config"

Optionally, you can publish the views using

php artisan vendor:publish --tag="expector-patronum-views"

Usage

Configure a new Plan (1 time) via /expector-patronum path, or by code:

$group = Group::query()->create(['name' => 'bla', 'color' => 'green']);
$expector = new Expector();

$plan = $expector->generatePlan('transmit 231', '0 20 * * *', $group, [['type' => StartedInTimeCheck::RULE_NAME]]);

Create next expectation days (this process is already scheduled every day to 20:00)

$expector->generateNextExpectations(CarbonImmutable::create(2024), CarbonImmutable::create(2024, day: 2));

Run the task

ExpectorPatronum::runTask('my Task', fn() => sleep(5));

General configurations via AppServiceProvider::register

Authorization With:

ExpectorPatronum::authWith(fn (Request $request) => !$this->app->environment('production') && $request->user())

Custom task identifier:

ExpectorPatronum::setExpectationUuidResolver(fn () => Str::uuid()->toString())

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions to ExpectorPatronum are welcome. Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch for each feature or improvement.
  3. Submit a pull request with a clear description of the changes.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-12