Skip to content

Commit b119f9b

Browse files
committed
Added readme
1 parent e876ad4 commit b119f9b

File tree

3 files changed

+69
-19
lines changed

3 files changed

+69
-19
lines changed

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Qless Queue driver for Laravel
2+
======================
3+
4+
## Installation
5+
6+
You can install this package via composer using this command:
7+
8+
```
9+
composer require pdffiller/laravel-queue-qless
10+
```
11+
12+
The package will automatically register itself using Laravel auto-discovery.
13+
14+
Setup connection in `config/queue.php`
15+
16+
```php
17+
'connections' => [
18+
// ...
19+
'qless' => [
20+
'driver' => 'qless',
21+
'connection' => 'qless',
22+
'queue' => 'default',
23+
],
24+
// ...
25+
],
26+
```
27+
28+
Also you can set Qless queue as default in `config/queue.php`
29+
30+
```php
31+
'default' => env('QUEUE_DRIVER', 'qless'),
32+
```
33+
34+
And redis connection in `config/database.php`
35+
36+
```php
37+
'redis' => [
38+
39+
'client' => 'predis',
40+
41+
// ...
42+
'qless' => [
43+
'host' => env('REDIS_HOST', '127.0.0.1'),
44+
'password' => env('REDIS_PASSWORD', null),
45+
'port' => env('REDIS_PORT', 6379),
46+
'database' => 0,
47+
],
48+
// ...
49+
],
50+
```
51+
52+
## Usage
53+
54+
Once you completed the configuration you can use Laravel Queue API. If you used other queue drivers you do not need to change anything else. If you do not know how to use Queue API, please refer to the official Laravel documentation: http://laravel.com/docs/queues
55+
56+
57+
## Testing
58+
59+
You can run the tests with:
60+
61+
```bash
62+
vendor/bin/phpunit
63+
```
64+
65+
## Contribution
66+
67+
You can contribute to this package by discovering bugs and opening issues. Please, add to which version of package you create pull request or issue. (e.g. [1.2] Fatal error on push job)

tests/Queue/QlessQueueTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public function testPushPop()
3131

3232
$job = $queue->pop('test_job');
3333

34+
$job->fire();
35+
3436
$this->assertInstanceOf(QlessJob::class, $job);
3537

3638
$this->assertEquals($jobId, $job->getJobId());

tests/TestCase.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)