Skip to content

Commit 4876d9f

Browse files
committed
dep: update to wq v0.13, implement new interface
1 parent f89b19c commit 4876d9f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
"require": {
2424
"php": ">=7.1",
25-
"mle86/wq": "^0.11.0||^1.0.0",
25+
"mle86/wq": "^0.13.0||^1.0.0",
2626
"ext-redis": "^3.0"
2727
}
2828
}

src/WQ/WorkServerAdapter/RedisWorkServer.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,4 +321,16 @@ public function deleteEntry(QueueEntry $entry): void
321321
// nop, we already removed the entry from the queue with LPOP
322322
}
323323

324+
public function disconnect(): void
325+
{
326+
if ($this->redis) {
327+
$this->redis->close();
328+
$this->redis = null;
329+
}
330+
}
331+
332+
public function __destruct()
333+
{
334+
$this->disconnect();
335+
}
324336
}

0 commit comments

Comments
 (0)