Make upgrade applications batch size a job parameter defaulting to 5 (#23101)
Makes the batch size used when upgrading applications a parameter instead of a hardcoded constant, defaulting to 5, and lets admins set it from the upgrade confirmation modal. Backend: - `UpgradeApplicationsJobData` gains an optional `batchSize` field, passed through by `UpgradeApplicationsJob` to the service. - `ApplicationUpgradeService.upgradeAllApplications` accepts an optional `batchSize` parameter, defaulting to `UPGRADE_APPLICATIONS_DEFAULT_BATCH_SIZE = 5` (previously a fixed batch size of 20). The value is sanitized to a positive integer to avoid an infinite batching loop. - The `upgradeRegistrationApplications` admin mutation accepts an optional `batchSize: Int` argument and forwards it to the job. Frontend (admin panel): - The "Upgrade existing installations" confirmation modal now includes a "Batch size" number input, defaulting to 5, sent with the mutation. - Updated the admin GraphQL document and generated types. ## Screenshots Upgrade section on the admin app registration page:  Confirmation modal with the new batch size input (defaults to 5):  --------- Co-authored-by: Martin <martin@twenty.com>
This commit is contained in:
+2
@@ -3,9 +3,11 @@ import { gql } from '@apollo/client';
|
||||
export const UPGRADE_REGISTRATION_APPLICATIONS = gql`
|
||||
mutation UpgradeRegistrationApplications(
|
||||
$applicationRegistrationId: String!
|
||||
$batchSize: Int
|
||||
) {
|
||||
upgradeRegistrationApplications(
|
||||
applicationRegistrationId: $applicationRegistrationId
|
||||
batchSize: $batchSize
|
||||
)
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user