コード例 #1
0
 /**
  * Runs the initial set up of the processing system
  */
 public function runAction()
 {
     try {
         $this->commandBus->dispatch(CreateDefaultProcessingConfigFile::in(ConfigLocation::fromPath(Definition::getSystemConfigDir())));
         $sqliteDbFile = SqliteDbFile::initializeFromDist(Definition::getEventStoreSqliteDbFile());
         $esConfigLocation = ConfigLocation::fromPath(Definition::getSystemConfigDir());
         $this->commandBus->dispatch(InitializeEventStore::setUpWithSqliteDbAdapter($sqliteDbFile, $esConfigLocation));
     } catch (\Exception $ex) {
         $this->commandBus->dispatch(UndoSystemSetUp::removeConfigs(Definition::getSystemConfigDir(), Definition::getSystemConfigDir(), Definition::getEventStoreSqliteDbFile()));
         throw $ex;
     }
     return $this->redirect()->toRoute('prooph.link/system_config');
 }