Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework #14

Merged
merged 28 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ada9b97
WIP..
machour Apr 25, 2019
3bf22ee
Fix closure tests
machour Apr 25, 2019
ad6ee19
Move events to their own dir, fix more tests
machour Apr 25, 2019
95eb456
Fix JobEvent tests
machour Apr 25, 2019
4e4e190
Fix serializer tests
machour Apr 25, 2019
8097948
Fix SyncQueue tests
machour Apr 25, 2019
bcf4199
Fix console utility configuration
machour Apr 25, 2019
3358cf4
Fix all MySQL tests but 1
machour Apr 25, 2019
91de39c
Fix Sqlite & Pgsql
machour Apr 25, 2019
ea4fbe6
Fix Introp tests
machour Apr 25, 2019
a33891b
Don't use Yii
machour Apr 25, 2019
fe07d64
Remove deprecated classes, clean up imports
machour Apr 25, 2019
4a172ec
Remove RetryableJob in favor of RetryableJobInterface
machour Apr 25, 2019
0a15d81
port https://github.com/yiisoft/yii2-queue/commit/eb8c7d4c635ae9da1c0…
machour Apr 25, 2019
d8c5a3a
Remove deprecated Job
machour Apr 25, 2019
a24afcc
Cleaning up..
machour Apr 25, 2019
92620fa
Fix ERROR event
machour Apr 25, 2019
854cd99
Fix directory cases
machour Apr 25, 2019
06d0253
Fix App case
machour Apr 26, 2019
71d32c0
Remove beanstalkd, redis
machour Apr 26, 2019
9fb4737
Disable api
machour Apr 26, 2019
495a35e
Fix case
machour Apr 26, 2019
2e4bd1e
Clean up
machour Apr 26, 2019
2d5d7ef
style ci is not enabled
machour Apr 26, 2019
5d67eb4
Fix conflicts
machour Apr 28, 2019
e4ee952
Use packages from packagist
machour Apr 30, 2019
6eb7a90
Empty UPGRADE docs
machour Apr 30, 2019
c522e73
Merge remote-tracking branch 'origin/master' into rework
machour Apr 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ matrix:
services:
- mysql
- postgresql
- redis-server
- rabbitmq

# cache vendor dirs
Expand All @@ -24,9 +23,6 @@ cache:

before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq beanstalkd
- sudo beanstalkd -v
- sudo service beanstalkd start
- pecl install igbinary

install:
Expand Down
146 changes: 0 additions & 146 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,148 +1,2 @@
Yii2 Queue Extension Change Log
===============================

2.1.1 under development
-----------------------

- Enh #248: Reduce roundtrips to beanstalk server when removing job (SamMousa)
- Bug #258: Worker in isolated mode fails if PHP_BINARY contains spaces (luke-)
- Bug #269: Handling of broken messages that are not unserialized correctly (zhuravljov)
- Bug #267: Fixed symfony/process incompatibility (rob006)
- Enh: Job execution result that forwarded to the event handler (zhuravljov)
- Enh: ErrorEvent mark as deprecated (zhuravljov)

2.1.0 May 24, 2018
------------------

- Bug #210: Worker option to define php bin path to run child process (zhuravljov)
- Enh: Worker loop event (zhuravljov)
- Bug #207: Console params validation (zhuravljov)
- Bug #224: Invalid identifier "DELAY" (lar-dragon)
- Enh #192: AWS SQS implementation (elitemaks, manoj-girnar)
- Bug #126: Handles a fatal error of the job execution in isolate mode (zhuravljov)

2.0.2 December 26, 2017
-----------------------

- Bug #92: Resolve issue in debug panel (farmani-eigital)
- Bug #99: Retry connecting after connection has timed out for redis driver (cebe)
- Bug #180: Fixed info command of file driver (victorruan)
- Enh #158: Add Amqp Interop driver (makasim)
- Enh #185: Loop object instead of Signal helper (zhuravljov)
- Enh #188: Configurable verbose mode (zhuravljov)
- Enh: Start and stop events of a worker (zhuravljov)

2.0.1 November 13, 2017
-----------------------

- Bug #98: Fixed timeout error handler (zhuravljov)
- Bug #112: Queue command inside module (tsingsun)
- Bug #118: Synchronized moving of delayed and reserved jobs to waiting list (zhuravljov)
- Bug #155: Slave DB breaks listener (zhuravljov)
- Enh #97: `Queue::status` is public method (zhuravljov)
- Enh #116: Add Chinese Guide (kids-return)
- Enh #122: Rename `Job` to `JobInterface` (zhuravljov)
- Enh #137: All throwable errors caused by jobs are now caught (brandonkelly)
- Enh #141: Clear and remove commands for File, DB, Beanstalk and Redis drivers (zhuravljov)
- Enh #147: Igbinary job serializer (xutl)
- Enh #148: Allow to change vhost setting for RabbitMQ (ischenko)
- Enh #151: Compatibility with Yii 2.0.13 and PHP 7.2 (zhuravljov)
- Enh #160: Benchmark of job wait time (zhuravljov)
- Enh: Rename `cli\Verbose` behavior to `cli\VerboseBehavior` (zhuravljov)
- Enh: Rename `serializers\Serializer` interface to `serializers\SerializerInterface` (zhuravljov)
- Enh: Added `Signal::setExitFlag()` to stop `Queue::run()` loop manually (silverfire)

2.0.0 July 15, 2017
-------------------

- Enh: The package is moved to yiisoft/yii2-queue (zhuravljov)

1.1.0 July 12, 2017
-------------------

- Enh #50 Documentation about worker starting control (zhuravljov)
- Enh #70: Durability for rabbitmq queues (mkubenka)
- Enh: Detailed error about job type in message handling (zhuravljov)
- Enh #60: Enhanced event handling (zhuravljov)
- Enh: Job priority for DB driver (zhuravljov)
- Enh: File mode options of file driver (zhuravljov)
- Enh #47: Redis queue listen timeout (zhuravljov)
- Enh #23: Retryable jobs (zhuravljov)

1.0.1 June 7, 2017
------------------

- Enh #58: Deleting failed jobs from queue (zhuravljov)
- Enh #55: Job priority (zhuravljov)

1.0.0 May 4, 2017
-----------------

- Enh: Improvements of log behavior (zhuravljov)
- Enh: File driver stat info (zhuravljov)
- Enh: Beanstalk stat info (zhuravljov)
- Enh: Colorized driver info actions (zhuravljov)
- Enh: Colorized verbose mode (zhuravljov)
- Enh: Improvements of debug panel (zhuravljov)
- Enh: Queue job message statuses (zhuravljov)
- Enh: Gii job generator (zhuravljov)
- Enh: Enhanced gearman driver (zhuravljov)
- Enh: Queue message identifiers (zhuravljov)
- Enh: File queue (zhuravljov)

0.12.2 April 29, 2017
---------------------

- Enh #10: Separate option that turn off isolate mode of job execute (zhuravljov)

0.12.1 April 20, 2017
---------------------

- Bug #37: Fixed opening of a child process (zhuravljov)
- Enh: Ability to push a closure (zhuravljov)
- Enh: Before push event (zhuravljov)

0.12.0 April 14, 2017
---------------------

- Enh #18: Executes a job in a child process (zhuravljov)
- Bug #25: Enabled output buffer breaks output streams (luke-)
- Enh: After push event (zhuravljov)

0.11.0 April 2, 2017
--------------------

- Enh #21: Delayed jobs for redis queue (zhuravljov)
- Enh: Info action for db and redis queue command (zhuravljov)

0.10.1 March 29, 2017
---------------------

- Bug: Fixed db driver for pgsql (zhuravljov)
- Bug #16: Timeout of  queue reading lock for db driver (zhuravljov)
- Enh: Minor code style enhancements (SilverFire)

0.10.0 March 22, 2017
---------------------

- Enh #14: Json job serializer (zhuravljov)
- Enh: Delayed running of a job (zhuravljov)

0.9.1 March 6, 2017
-------------------

- Bug #13: Fixed reading of DB queue (zhuravljov)

0.9.0 March 6, 2017
-------------------

- Enh: Signal handlers (zhuravljov)
- Enh: Add exchange for AMQP driver (airani)
- Enh: Beanstalk driver (zhuravljov)
- Enh: Added English docs (samdark)






2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Each task which is sent to queue should be defined as a separate class.
For example, if you need to download and save a file the class may look like the following:

```php
class DownloadJob extends BaseObject implements \yii\queue\JobInterface
class DownloadJob extends BaseObject implements \Yiisoft\Yii\Queue\JobInterface
{
public $url;
public $file;
Expand Down
18 changes: 9 additions & 9 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ application when you upgrade the package from one version to another.
Upgrade to 2.1.1
samdark marked this conversation as resolved.
Show resolved Hide resolved
----------------

* `\yii\queue\ErrorEvent` has been deprecated and will be removed in `3.0`.
Use `\yii\queue\ExecEvent` instead.
* `\Yiisoft\Yii\Queue\ErrorEvent` has been deprecated and will be removed in `3.0`.
Use `\Yiisoft\Yii\Queue\ExecEvent` instead.

Upgrade from 2.0.1 to 2.0.2
---------------------------

* The [Amqp driver](docs/guide/driver-amqp.md) has been deprecated and will be removed in `2.1`.
It is advised to migrate to [Amqp Interop](docs/guide/driver-amqp-interop.md) instead.

* Added `\yii\queue\cli\Command::isWorkerAction()` abstract method. If you use your own console
* Added `\Yiisoft\Yii\Queue\Cli\Command::isWorkerAction()` abstract method. If you use your own console
controllers to run queue listeners, you must implement it.

* `\yii\queue\cli\Signal` helper is deprecated and will be removed in `2.1`. The extension uses
`\yii\queue\cli\SignalLoop` instead of the helper.
* `\Yiisoft\Yii\Queue\Cli\Signal` helper is deprecated and will be removed in `2.1`. The extension uses
`\Yiisoft\Yii\Queue\Cli\SignalLoop` instead of the helper.

* If you use your own console controller to listen to a queue, you must upgrade it. See the native
console controllers for how to upgrade.

Upgrade from 2.0.0 to 2.0.1
---------------------------

* `yii\queue\cli\Verbose` behavior was renamed to `yii\queue\cli\VerboseBehavior`. The old class was
* `Yiisoft\Yii\Queue\Cli\Verbose` behavior was renamed to `Yiisoft\Yii\Queue\Cli\VerboseBehavior`. The old class was
marked as deprecated and will be removed in `2.1.0`.

* `Job`, `RetryableJob` and `Serializer` interfaces were renamed to `JobInterface`,
Expand Down Expand Up @@ -75,7 +75,7 @@ Upgrade from 0.10.1

```php
'queue' => [
'class' => \zhuravljov\yii\queue\db\Queue::class,
'class' => \zhuravljov\Yiisoft\Yii\Queue\Drivers\Db\Queue::class,
'db' => 'db',
'tableName' => '{{%queue}}',
'channel' => 'default',
Expand All @@ -87,9 +87,9 @@ Upgrade from 0.10.1

```php
'queue' => [
'class' => \zhuravljov\yii\queue\Queue::class,
'class' => \zhuravljov\Yiisoft\Yii\Queue\Queue::class,
'driver' => [
'class' => \yii\queue\db\Driver::class,
'class' => \Yiisoft\Yii\Queue\Drivers\Db\Driver::class,
'db' => 'db',
'tableName' => '{{%queue}}'
'channel' => 'default',
Expand Down
42 changes: 28 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"docs": "https://github.com/yiisoft/yii-queue/blob/master/docs/guide"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"yiisoft/yii-core": "^3.0@dev",
"yiisoft/yii-console": "^3.0@dev",
Expand All @@ -40,7 +41,11 @@
"yiisoft/cache": "^3.0@dev",
"phpunit/phpunit": "^7.3",
"aws/aws-sdk-php": ">=2.4",
"hiqdev/composer-config-plugin": "^1.0@dev"
"hiqdev/composer-config-plugin": "^1.0@dev",
"yiisoft/mutex-file": "^3.0@dev",
"yiisoft/db-mysql": "^3.0@dev",
"yiisoft/db-sqlite": "^3.0@dev",
"yiisoft/db-pgsql": "^3.0@dev"
},
"suggest": {
"ext-pcntl": "Need for process signals.",
Expand All @@ -53,20 +58,12 @@
},
"autoload": {
"psr-4": {
"yii\\queue\\": "src",
"yii\\queue\\amqp_interop\\": "src/drivers/amqp_interop",
"yii\\queue\\beanstalk\\": "src/drivers/beanstalk",
"yii\\queue\\db\\": "src/drivers/db",
"yii\\queue\\file\\": "src/drivers/file",
"yii\\queue\\gearman\\": "src/drivers/gearman",
"yii\\queue\\redis\\": "src/drivers/redis",
"yii\\queue\\sync\\": "src/drivers/sync",
"yii\\queue\\sqs\\": "src/drivers/sqs"
"Yiisoft\\Yii\\Queue\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"yii\\queue\\tests\\": "tests"
"Yiisoft\\Yii\\Queue\\Tests\\": "tests"
}
},
"extra": {
Expand All @@ -75,9 +72,26 @@
},
"config-plugin": {
"tests": "config/tests.php",
"params": "config/params.php",
"common": "config/common.php",
"console": "config/console.php"
"console": "config/console.php",
"tests-app": ["$common","$console","tests/App/config/main.php", "tests/App/config/console.php"]
}
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/yiisoft/mutex-file",
"no-api": true
},
{
"type": "vcs",
"url": "https://github.com/yiisoft/mutex-db-mysql",
"no-api": true
},
{
"type": "vcs",
"url": "https://github.com/yiisoft/mutex-db-pgsql",
"no-api": true
}
]
machour marked this conversation as resolved.
Show resolved Hide resolved
}
6 changes: 3 additions & 3 deletions config/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

return [
'queue' => [
'__class' => \yii\queue\sync\Queue::class,
'__class' => \Yiisoft\Yii\Queue\Drivers\Sync\Queue::class,
],
\yii\queue\serializers\SerializerInterface::class => Reference::to('queue.serializer'),
\Yiisoft\Yii\Queue\Serializers\SerializerInterface::class => Reference::to('queue.serializer'),
'queue.serializer' => [
'__class' => \yii\queue\serializers\PhpSerializer::class,
'__class' => \Yiisoft\Yii\Queue\Serializers\PhpSerializer::class,
],
];
5 changes: 0 additions & 5 deletions config/params.php

This file was deleted.

7 changes: 6 additions & 1 deletion config/tests.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

return [

'aliases' => [
'@runtime' => dirname(__DIR__) . '/tests/runtime',
],
'syncQueue' => [
'__class' => \Yiisoft\Yii\Queue\Drivers\Sync\Queue::class,
],
];
2 changes: 1 addition & 1 deletion docs/guide-ja/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return [
'debug' => [
'class' => \yii\debug\Module::class,
'panels' => [
'queue' => \yii\queue\debug\Panel::class,
'queue' => \Yiisoft\Yii\Queue\Debug\Panel::class,
],
],
],
Expand Down
4 changes: 2 additions & 2 deletions docs/guide-ja/driver-amqp-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ return [
],
'components' => [
'queue' => [
'class' => \yii\queue\amqp_interop\Queue::class,
'class' => \Yiisoft\Yii\Queue\Drivers\Interop\Queue::class,
'port' => 5672,
'user' => 'guest',
'password' => 'guest',
'queueName' => 'queue',
'driver' => yii\queue\amqp_interop\Queue::ENQUEUE_AMQP_LIB,
'driver' => Yiisoft\Yii\Queue\Drivers\Interop\Queue::ENQUEUE_AMQP_LIB,

// または
'dsn' => 'amqp://guest:guest@localhost:5672/%2F',
Expand Down
2 changes: 1 addition & 1 deletion docs/guide-ja/driver-beanstalk.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ return [
],
'components' => [
'queue' => [
'class' => \yii\queue\beanstalk\Queue::class,
'class' => \Yiisoft\Yii\Queue\beanstalk\Queue::class,
'host' => 'localhost',
'port' => 11300,
'tube' => 'queue',
Expand Down
4 changes: 2 additions & 2 deletions docs/guide-ja/driver-db.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ return [
// ...
],
'queue' => [
'class' => \yii\queue\db\Queue::class,
'class' => \Yiisoft\Yii\Queue\Drivers\Db\Queue::class,
'db' => 'db', // DB 接続コンポーネントまたはその構成情報
'tableName' => '{{%queue}}', // テーブル名
'channel' => 'default', // キュー・チャンネル・キー
Expand Down Expand Up @@ -60,7 +60,7 @@ CREATE TABLE `queue` (
'migrationPath' => null,
'migrationNamespaces' => [
// ...
'yii\queue\db\migrations',
'Yiisoft\Yii\Queue\Drivers\Db\migrations',
],
],
],
Expand Down
2 changes: 1 addition & 1 deletion docs/guide-ja/driver-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ return [
],
'components' => [
'queue' => [
'class' => \yii\queue\file\Queue::class,
'class' => \Yiisoft\Yii\Queue\file\Queue::class,
'path' => '@runtime/queue',
],
],
Expand Down
Loading