Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `$worker = new Worker();
- $class = new ApiaryController();
- do {
- $job = $worker->cache()->lpop('jobs:buy_cells');
- if ($job) {
- $job = json_decode($job);
- switch ($job->method)
- {
- case 'cell':
- $result = $class->cell($job);
- break;
- case 'honeycomb':
- $class->honeycomb($job);
- break;
- }
- if(!empty($result) && isset($job->guid)) {
- $worker->cache()->setex('jobs:' . $job->guid, 3600, json_encode($result));
- }
- }
- } while ($exit_metka);`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement