|
@@ -33,6 +33,7 @@ class PostUpgradeCommand extends Command
|
|
|
|
|
|
|
|
$this->populateSubdomains();
|
|
$this->populateSubdomains();
|
|
|
$this->genEventsUuid();
|
|
$this->genEventsUuid();
|
|
|
|
|
+ $this->updateFilesStatuses();
|
|
|
|
|
|
|
|
$output->writeln("Post-upgrade operations successfully executed");
|
|
$output->writeln("Post-upgrade operations successfully executed");
|
|
|
return Command::SUCCESS;
|
|
return Command::SUCCESS;
|
|
@@ -148,8 +149,8 @@ class PostUpgradeCommand extends Command
|
|
|
$this->logger->info('Subdomain table was successfully populated');
|
|
$this->logger->info('Subdomain table was successfully populated');
|
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
|
$opentalentCnn->rollBack();
|
|
$opentalentCnn->rollBack();
|
|
|
- $this->logger->critical('Error while running the post-upgrade script, abort and rollback');
|
|
|
|
|
- throw $e;
|
|
|
|
|
|
|
+ $this->logger->error($e);
|
|
|
|
|
+ $this->logger->critical('Error while populating the subdomains, abort and rollback');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -172,8 +173,28 @@ class PostUpgradeCommand extends Command
|
|
|
$this->logger->info('Events uuid were successfully generated');
|
|
$this->logger->info('Events uuid were successfully generated');
|
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
|
$opentalentCnn->rollBack();
|
|
$opentalentCnn->rollBack();
|
|
|
- $this->logger->critical('Error while running the post-upgrade script, abort and rollback');
|
|
|
|
|
- throw $e;
|
|
|
|
|
|
|
+ $this->logger->error($e);
|
|
|
|
|
+ $this->logger->critical('Error while generating events uuids, abort and rollback');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private function updateFilesStatuses() {
|
|
|
|
|
+ $opentalentCnn = $this->getOpentalentConnexion();
|
|
|
|
|
+
|
|
|
|
|
+ $opentalentCnn->beginTransaction();
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ $this->logger->info('Update file statuses');
|
|
|
|
|
+
|
|
|
|
|
+ $sql = "update opentalent.File set status='READY', host='api';";
|
|
|
|
|
+ $opentalentCnn->query($sql);
|
|
|
|
|
+
|
|
|
|
|
+ $opentalentCnn->commit();
|
|
|
|
|
+ $this->logger->info('Files statuses were successfully updated');
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ $opentalentCnn->rollBack();
|
|
|
|
|
+ $this->logger->error($e);
|
|
|
|
|
+ $this->logger->critical('Error while updating file statuses, abort and rollback');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|