summaryrefslogtreecommitdiff
path: root/src/jobs/Hello.php
blob: 4fa24464d1eb7a841cab231e405a23d7a0a99fba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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]);
    }

}