diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-09-27 14:53:04 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-09-29 10:29:40 +0200 |
commit | 04ecc2a6a95a3c996b496b851cabc201f9716ebb (patch) | |
tree | 633b540b89ec7c68d0e4d8fd6f8ec727c9811b81 /tests/lib | |
parent | f8f437072ac13a4556dea18219d55f11466497e5 (diff) | |
download | nextcloud-server-04ecc2a6a95a3c996b496b851cabc201f9716ebb.tar.gz nextcloud-server-04ecc2a6a95a3c996b496b851cabc201f9716ebb.zip |
feat(backgroundjob): Schedule job after <timestamp>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/BackgroundJob/DummyJobList.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/BackgroundJob/DummyJobList.php b/tests/lib/BackgroundJob/DummyJobList.php index 8574f462ca7..7886e8f877c 100644 --- a/tests/lib/BackgroundJob/DummyJobList.php +++ b/tests/lib/BackgroundJob/DummyJobList.php @@ -35,7 +35,7 @@ class DummyJobList extends \OC\BackgroundJob\JobList { * @param IJob|class-string<IJob> $job * @param mixed $argument */ - public function add($job, $argument = null): void { + public function add($job, $argument = null, int $firstCheck = null): void { if (is_string($job)) { /** @var IJob $job */ $job = \OCP\Server::get($job); @@ -46,6 +46,10 @@ class DummyJobList extends \OC\BackgroundJob\JobList { } } + public function scheduleAfter(string $job, int $runAfter, $argument = null): void { + $this->add($job, $argument, $runAfter); + } + /** * @param IJob|string $job * @param mixed $argument |