超时问题
This commit is contained in:
parent
2647a4547e
commit
432dc7b3e7
@ -38,6 +38,9 @@ class MongoSyncJob implements ShouldQueue
|
||||
$this->page = $page;
|
||||
$this->limit = $limit;
|
||||
$this->utcDateTime = $utcDateTime;
|
||||
set_time_limit(0);
|
||||
ini_set('memory_limit', '4096m');
|
||||
ini_set('default_socket_timeout', -1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,5 +101,7 @@ class MongoSyncJob implements ShouldQueue
|
||||
$builder->connection->insert($sql, Arr::flatten($values, 1));
|
||||
|
||||
app(CardRepository::class)->forgetCached();
|
||||
|
||||
Log::info("MongoSyncJob END #: utcDateTime {$this->utcDateTime} - page {$this->page}");
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,9 @@ class CardSyncJob implements ShouldQueue
|
||||
$this->page = $page;
|
||||
$this->limit = $limit;
|
||||
$this->maxId = $maxId;
|
||||
set_time_limit(0);
|
||||
ini_set('memory_limit', '4096m');
|
||||
ini_set('default_socket_timeout', -1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -101,5 +104,7 @@ class CardSyncJob implements ShouldQueue
|
||||
$builder->connection->insert($sql, Arr::flatten($array, 1));
|
||||
|
||||
app(CardRepository::class)->forgetCached();
|
||||
|
||||
Log::info("CardSyncJob END #: maxId {$this->maxId} - page {$this->page}");
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,9 @@ class LogSyncJob implements ShouldQueue
|
||||
$this->page = $page;
|
||||
$this->limit = $limit;
|
||||
$this->maxId = $maxId;
|
||||
set_time_limit(0);
|
||||
ini_set('memory_limit', '4096m');
|
||||
ini_set('default_socket_timeout', -1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -175,6 +178,7 @@ class LogSyncJob implements ShouldQueue
|
||||
|
||||
} catch (\Exception $e) {
|
||||
DB::rollback();
|
||||
Log::info("LogSyncJob ERROR #: maxId {$this->maxId} - page {$this->page}");
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@ -186,6 +190,8 @@ class LogSyncJob implements ShouldQueue
|
||||
app(OrderRenewalPackageCardRepository::class)->forgetCached();
|
||||
app(OrderFlowPackageCardsRepository::class)->forgetCached();
|
||||
app(OrderCardPartitionRepository::class)->forgetCached();
|
||||
|
||||
Log::info("LogSyncJob END #: maxId {$this->maxId} - page {$this->page}");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user