Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webtoolsnz/yii2-scheduler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.1.2
Choose a base ref
...
head repository: webtoolsnz/yii2-scheduler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 15 commits
  • 8 files changed
  • 5 contributors

Commits on Jan 24, 2017

  1. Fix overdue calculation

    Nate Walker committed Jan 24, 2017
    Copy the full SHA
    7404f1a View commit details
  2. Merge pull request #7 from webtoolsnz/BG911

    Fix overdue calculation
    kiwinewt authored Jan 24, 2017
    Copy the full SHA
    bf42189 View commit details

Commits on Jul 3, 2017

  1. Update README.md

    Updating instructions for error handling / emailing
    brucealdridge authored Jul 3, 2017
    Copy the full SHA
    849354e View commit details

Commits on Jul 31, 2019

  1. Copy the full SHA
    76e5702 View commit details
  2. Copy the full SHA
    9a2b1f5 View commit details
  3. Copy the full SHA
    5d0db3f View commit details
  4. Copy the full SHA
    bedbe7c View commit details
  5. Remove php 7.3 env - upgrading yii is causing package conflicts, can …

    …deal with this later
    badams committed Jul 31, 2019
    Copy the full SHA
    db2f0cf View commit details
  6. Merge pull request #11 from webtoolsnz/fix/ci_builds_failing

    Fix CI pipeline
    badams authored Jul 31, 2019
    Copy the full SHA
    c7da545 View commit details

Commits on Oct 22, 2019

  1. Refactored Error handler slightly added TASK_FAILURE event (#12)

    * Refactored Error handler slightly added TASK_FAILURE event
    badams authored Oct 22, 2019
    Copy the full SHA
    cf7fbb2 View commit details

Commits on Dec 5, 2019

  1. Exception->getName() isn't standard.

    bruce aldridge authored Dec 5, 2019
    Copy the full SHA
    b4c8b76 View commit details

Commits on Jan 12, 2020

  1. Update README.md

    bruce aldridge authored Jan 12, 2020
    Copy the full SHA
    4322e6e View commit details

Commits on Mar 4, 2020

  1. Notice generated when $error is null

    bruce aldridge authored Mar 4, 2020
    Copy the full SHA
    7e51895 View commit details

Commits on Jun 8, 2020

  1. Stop unwanted outputbuffing notice

    > If the function fails it generates an E_NOTICE.
    
    prevent notice as this will break the error catching.
    bruce aldridge authored Jun 8, 2020
    Copy the full SHA
    f33b7fb View commit details

Commits on Oct 12, 2020

  1. Delete composer.lock

    removing lock file - due to vunerability
    bruce aldridge authored Oct 12, 2020
    Copy the full SHA
    f6ca6df View commit details
Showing with 96 additions and 3,132 deletions.
  1. +4 −3 .travis.yml
  2. +34 −2 README.md
  3. +0 −3,105 composer.lock
  4. +13 −5 src/ErrorHandler.php
  5. +2 −1 src/Task.php
  6. +24 −12 src/TaskRunner.php
  7. +18 −3 src/events/TaskEvent.php
  8. +1 −1 src/migrations/m150510_090513_Scheduler.php
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
language: php

services:
- mysql

php:
- 5.4
- 5.5
- 5.6
- 7.0

install:
- composer self-update
- composer global require "fxp/composer-asset-plugin"
- travis_retry composer install --no-interaction --prefer-source --dev
- travis_retry composer install --no-interaction --prefer-source

before_script:
- travis_retry mysql -e "CREATE DATABASE scheduler_test;"
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -29,10 +29,42 @@ The `config/console.php` file should be updated to reflect the changes below
'components' => [
'errorHandler' => [
'class' => 'webtoolsnz\scheduler\ErrorHandler'
]
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\EmailTarget',
'mailer' =>'mailer',
'levels' => ['error', 'warning'],
'message' => [
'to' => ['admin@example.com'],
'from' => [$params['adminEmail']],
'subject' => 'Scheduler Error - ####SERVERNAME####'
],
'except' => [
],
],
],
],
]
~~~

also add this to the top of your `config/console.php` file
~~~php
\yii\base\Event::on(
\webtoolsnz\scheduler\console\SchedulerController::className(),
\webtoolsnz\scheduler\events\SchedulerEvent::EVENT_AFTER_RUN,
function ($event) {
if (!$event->success) {
foreach($event->exceptions as $exception) {
throw $exception;
}
}
}
);
~~~

To implement the GUI for scheduler also add the following to your `config/web.php`
~~~php
'bootstrap' => ['log', 'scheduler'],
@@ -172,4 +204,4 @@ You could throw the exceptions at the task level, however this will prevent furt

## License

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.
The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.
Loading