1
0
Fork 0

优化设备数据同步

develop
李静 2023-05-05 17:21:05 +08:00
parent 3f43e9953f
commit 4646f1fd16
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class DeviceLogSyncCommand extends Command
*/
protected $signature = 'device-log:sync
{factory}
{--sleep=60 : 设备数据同步完成后的休眠时间()}';
{--sleep=60 : 设备数据同步完成后的休眠时间(秒)}';
/**
* The console command description.
@ -38,7 +38,7 @@ class DeviceLogSyncCommand extends Command
{
$this->deviceLogService = $deviceLogService;
$sleep = value(fn ($sleep) => is_numeric($sleep) ? (int) $sleep : 60, $this->option('sleep'));
$sleep = (int) value(fn ($sleep) => is_numeric($sleep) ? $sleep : 60, $this->option('sleep'));
while (true) {
$end = now();