去掉事务

This commit is contained in:
邓皓元 2019-04-26 00:52:19 +08:00
parent f04e013498
commit a6cc1c50dc

View File

@ -71,7 +71,6 @@ class FlowPoolMonthSync extends Command
$array = array_merge($array, $items); $array = array_merge($array, $items);
} }
DB::transaction(function () use ($array) {
$this->line('插入数据,条数 #:' . count($array)); $this->line('插入数据,条数 #:' . count($array));
foreach (array_groupBy($array, 'month') as $month => $group) { foreach (array_groupBy($array, 'month') as $month => $group) {
@ -96,7 +95,6 @@ class FlowPoolMonthSync extends Command
app(FlowPoolMonth::class)->setTable($table)->upsert($values, ['sim', 'month']); app(FlowPoolMonth::class)->setTable($table)->upsert($values, ['sim', 'month']);
} }
} }
});
$this->line($this->description . ' End'); $this->line($this->description . ' End');
} }