<?php




namespace ln\jobs;


use ln\interfaces\JobInterface;
use ln\services\YunxinSmsService;
use think\facade\Log;

class SendSmsJob implements JobInterface
{

    public function fire($job, $data)
    {
        try {
            YunxinSmsService::sendMessage($data['tempId'], $data['id']);
        } catch (\Exception $e) {
            Log::info('发送短信失败' . var_export($data, 1) . $e->getMessage());
        }
        $job->delete();
    }

    public function failed($data)
    {
        // TODO: Implement failed() method.
    }
}
