aboutsummaryrefslogtreecommitdiff
path: root/src/jobs/Hello.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-05-07 23:39:20 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-05-07 23:39:30 +0300
commit9a98ac50ff50dda2f2eed1ea825352c50c64440e (patch)
treecc5c7d36eee1ec934f8728e7f9104a9d2d760856 /src/jobs/Hello.php
initial
Diffstat (limited to 'src/jobs/Hello.php')
-rw-r--r--src/jobs/Hello.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/jobs/Hello.php b/src/jobs/Hello.php
new file mode 100644
index 0000000..4fa2446
--- /dev/null
+++ b/src/jobs/Hello.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace jobs;
+
+class Hello extends \Job
+{
+
+ public function run()
+ {
+ $greetings = "Hello, ".($this->input['name'] ?? 'noname').".\n";
+ $greetings .= "I'm writing you from ".__METHOD__.", my PID is ".getmypid()." and I'm executing job #".$this->id.".";
+ echo jsonEncode(['response' => $greetings]);
+ }
+
+}