Skip to content

Commit

Permalink
chore: add ability to set ReadChunk queue and connection from impor… (
Browse files Browse the repository at this point in the history
#4002)

* chore: add ability to set `ReadChunk` queue and connection from import class

* Update ReadChunk.php
  • Loading branch information
dammy001 authored Oct 26, 2023
1 parent 9e5b7ca commit 5a54741
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Jobs/ReadChunk.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ class ReadChunk implements ShouldQueue
*/
private $chunkSize;

/**
* @var string
*/
public $queue;

/**
* @var string
*/
public $connection;

/**
* @param WithChunkReading $import
* @param IReader $reader
Expand All @@ -101,6 +111,8 @@ public function __construct(WithChunkReading $import, IReader $reader, Temporary
$this->tries = $import->tries ?? null;
$this->maxExceptions = $import->maxExceptions ?? null;
$this->backoff = method_exists($import, 'backoff') ? $import->backoff() : ($import->backoff ?? null);
$this->connection = property_exists($import, 'connection') ? $import->connection : null;
$this->queue = property_exists($import, 'queue') ? $import->queue : null;
}

/**
Expand Down

0 comments on commit 5a54741

Please sign in to comment.