|
|
@@ -38,6 +38,16 @@ class RdGenerateDeviceService extends Service
|
|
|
|
|
|
if (!$hasWorkDays) return [false, '当月无工作日,无法生成'];
|
|
|
|
|
|
+// try {
|
|
|
+// DB::transaction(function () use($data) {
|
|
|
+// $this->doGenerate($data['month']);
|
|
|
+// });
|
|
|
+// } catch (\Exception $e) {
|
|
|
+// // 只有这里 throw 了,任务才会进入 failed_jobs 表
|
|
|
+// return [false, $e->getMessage()];
|
|
|
+//
|
|
|
+// }
|
|
|
+
|
|
|
$key = self::job_name . $data['month'];
|
|
|
$data['lock_key'] = $key;
|
|
|
|
|
|
@@ -46,7 +56,7 @@ class RdGenerateDeviceService extends Service
|
|
|
|
|
|
ProcessDataJob::dispatch($data)->onQueue(self::job_name);
|
|
|
|
|
|
- return [true, '任务已提交至后台处理,请稍后查看'];
|
|
|
+ return [true, '任看'];
|
|
|
}
|
|
|
|
|
|
public function delTableKey($key){
|