summaryrefslogtreecommitdiff
path: root/plugins/jobs/tests/Jobs/Local/Job.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jobs/tests/Jobs/Local/Job.php')
-rw-r--r--plugins/jobs/tests/Jobs/Local/Job.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/jobs/tests/Jobs/Local/Job.php b/plugins/jobs/tests/Jobs/Local/Job.php
new file mode 100644
index 00000000..2f5803c8
--- /dev/null
+++ b/plugins/jobs/tests/Jobs/Local/Job.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * Spiral Framework.
+ *
+ * @license MIT
+ * @author Anton Titov (Wolfy-J)
+ */
+
+declare(strict_types=1);
+
+namespace Spiral\Jobs\Tests\Local;
+
+use Spiral\Jobs\JobHandler;
+
+class Job extends JobHandler
+{
+ public const JOB_FILE = __DIR__ . '/../../local.job';
+
+ public function invoke(string $id, array $payload): void
+ {
+ file_put_contents(self::JOB_FILE, json_encode(
+ $payload + compact('id')
+ ));
+ }
+}