현장 확인 업로드
This commit is contained in:
@@ -42,11 +42,13 @@ class NaverWorker extends BaseCommand
|
||||
|
||||
// 1. DB 연결 상태 체크 (더 견고하게)
|
||||
try {
|
||||
if ($this->db->connID === false || !@$this->db->connID->ping()) {
|
||||
// connID가 없거나, 가벼운 쿼리 실행 실패 시 재연결 시도
|
||||
if ($this->db->connID === false || !$this->db->simpleQuery('SELECT 1')) {
|
||||
$this->db->reconnect();
|
||||
CLI::write(CLI::color('🔄 Database reconnected.', 'yellow'));
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// 어떤 이유로든 에러 발생 시 재연결 시도
|
||||
$this->db->reconnect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user