Skip to content

Commit 7cbe047

Browse files
committed
add abstract methods to BaseHandler
1 parent 150715b commit 7cbe047

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/Handlers/BaseHandler.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ abstract class BaseHandler
1919
protected QueueConfig $config;
2020
protected ?string $priority = null;
2121

22+
abstract public function push(string $queue, string $job, array $data): bool;
23+
24+
abstract public function pop(string $queue, array $priorities): ?QueueJob;
25+
26+
abstract public function later(QueueJob $queueJob, int $seconds): bool;
27+
28+
abstract public function failed(QueueJob $queueJob, Throwable $err, bool $keepJob): bool;
29+
30+
abstract public function done(QueueJob $queueJob, bool $keepJob): bool;
31+
32+
abstract public function clear(?string $queue = null): bool;
33+
2234
/**
2335
* Set priority for job queue.
2436
*/

tests/_support/Jobs/Success.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class Success extends BaseJob implements JobInterface
99
{
1010
protected int $retryAfter = 6;
11-
protected int $retries = 3;
11+
protected int $tries = 3;
1212

1313
public function process(): bool
1414
{

0 commit comments

Comments
 (0)