blob: f8bd541ac2d000e96c217577ab757871c5f2a161 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
declare(strict_types=1);
namespace Spiral\Jobs\Tests\Beanstalk;
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')
));
}
}
|