From 929faed423509494ecebaef48f28213954ec799b Mon Sep 17 00:00:00 2001 From: Vaclav Eder Date: Tue, 25 Apr 2023 17:10:28 +0200 Subject: [PATCH 1/2] Add to mass project queue migration alternat function --- src/Keboola/Console/Command/MassProjectQueueMigration.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Keboola/Console/Command/MassProjectQueueMigration.php b/src/Keboola/Console/Command/MassProjectQueueMigration.php index 1e69f82..fd84714 100644 --- a/src/Keboola/Console/Command/MassProjectQueueMigration.php +++ b/src/Keboola/Console/Command/MassProjectQueueMigration.php @@ -24,6 +24,7 @@ class MassProjectQueueMigration extends Command const ARGUMENT_SOURCE_FILE = 'source-file'; const FEATURE_QUEUE_V2 = 'queuev2'; + const FEATURE_ALTERNAT = 'alternat'; const COMPONENT_QUEUE_MIGRATION_TOOL = 'keboola.queue-migration-tool'; const JOB_STATES_FINAL = ['success', 'error', 'terminated', 'cancelled']; @@ -79,9 +80,10 @@ private function createMigrationJob( Client $manageClient, OutputInterface $output ): ?array { - // set queuev2 project feature + // set queuev2 and alternat project feature try { $manageClient->addProjectFeature($projectId, self::FEATURE_QUEUE_V2); + $manageClient->addProjectFeature($projectId, self::FEATURE_ALTERNAT); $storageToken = $this->createStorageToken($manageClient, $projectId); } catch (ManageClientException $e) { $output->writeln(sprintf( @@ -214,6 +216,7 @@ protected function execute(InputInterface $input, OutputInterface $output) )); $manageClient->removeProjectFeature($errorJob['projectId'], self::FEATURE_QUEUE_V2); + $manageClient->removeProjectFeature($errorJob['projectId'], self::FEATURE_ALTERNAT); } $output->writeln(sprintf('%s migration jobs were terminated or cancelled:', count($terminatedJobs))); From 9356648fe6fca9161420f5f01e1d6d58a1ab11a7 Mon Sep 17 00:00:00 2001 From: Vaclav Eder Date: Tue, 25 Apr 2023 17:11:03 +0200 Subject: [PATCH 2/2] Add to mass project queue migration alternat function --- src/Keboola/Console/Command/MassProjectQueueMigration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Keboola/Console/Command/MassProjectQueueMigration.php b/src/Keboola/Console/Command/MassProjectQueueMigration.php index fd84714..591fc59 100644 --- a/src/Keboola/Console/Command/MassProjectQueueMigration.php +++ b/src/Keboola/Console/Command/MassProjectQueueMigration.php @@ -80,7 +80,7 @@ private function createMigrationJob( Client $manageClient, OutputInterface $output ): ?array { - // set queuev2 and alternat project feature + // set queuev2 and alternat project features try { $manageClient->addProjectFeature($projectId, self::FEATURE_QUEUE_V2); $manageClient->addProjectFeature($projectId, self::FEATURE_ALTERNAT);