Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit 212bce2

Browse files
committed
fixed "incompatible" definition
1 parent c6ae93a commit 212bce2

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/InfluxDbFacade.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public static function __callStatic($method, $arguments)
5858
public static function write(array $parameters, $payload): bool
5959
{
6060
if (config('influxdb.queue.enable', false) === true) {
61-
Write::dispatch($parameters, $payload);
61+
Write::dispatch($parameters, $payload)
62+
->onQueue(config('influxdb.queue.name', 'default'));
6263
} else {
6364
return static::getFacadeRoot()
6465
->write($parameters, $payload);
@@ -80,7 +81,8 @@ public static function writePayload(
8081
$retentionPolicy = null
8182
): bool {
8283
if (config('influxdb.queue.enable', false) === true) {
83-
WritePayload::dispatch($payload, $precision, $retentionPolicy);
84+
WritePayload::dispatch($payload, $precision, $retentionPolicy)
85+
->onQueue(config('influxdb.queue.name', 'default'));
8486
} else {
8587
return static::getFacadeRoot()
8688
->writePayload($payload, $precision, $retentionPolicy);
@@ -102,7 +104,8 @@ public static function writePoints(
102104
$retentionPolicy = null
103105
): bool {
104106
if (config('influxdb.queue.enable', false) === true) {
105-
WritePoints::dispatch($points, $precision, $retentionPolicy);
107+
WritePoints::dispatch($points, $precision, $retentionPolicy)
108+
->onQueue(config('influxdb.queue.name', 'default'));
106109
} else {
107110
return static::getFacadeRoot()
108111
->writePoints($points, $precision, $retentionPolicy);

src/Jobs/Job.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ class Job implements ShouldQueue
2525
use Queueable;
2626
use SerializesModels;
2727

28-
/**
29-
* The name of the queue the job should be sent to.
30-
*
31-
* @var string|null
32-
*/
33-
public $queue;
34-
3528
/**
3629
* @var array
3730
*/
@@ -44,8 +37,6 @@ class Job implements ShouldQueue
4437
*/
4538
public function __construct(array $args = [])
4639
{
47-
$this->queue = config('influxdb.queue.name', 'default');
48-
4940
if (count($args)) {
5041
$this->args = $args;
5142
}

0 commit comments

Comments
 (0)