Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { MessageBusJobHandler } from '@Pimcore/modules/execution-engine/message-
import { ChildJobStepTracker } from '@Pimcore/modules/execution-engine/message-handlers/message-bus-job/step-tracker/child-job-step-tracker'
import { DefaultStepTracker } from '@Pimcore/modules/execution-engine/message-handlers/message-bus-job/step-tracker/default-step-tracker'
import { ProgressFieldCalculator } from '@Pimcore/modules/execution-engine/message-handlers/message-bus-job/progress-calculator/progress-field-calculator'
import { BatchedStepProgressCalculator } from '@Pimcore/modules/execution-engine/message-handlers/message-bus-job/progress-calculator/batched-step-progress-calculator'
import { ZipDownloadJob } from '@Pimcore/modules/execution-engine/jobs/download/zip-download-job'
import { CsvDownloadJob } from '@Pimcore/modules/execution-engine/jobs/download/csv-download-job'
import { XlsxDownloadJob } from '@Pimcore/modules/execution-engine/jobs/download/xlsx-download-job'
Expand Down Expand Up @@ -243,10 +244,10 @@ describe('AbstractBatchEditJob.rehydrate()', () => {
expect(opts.stepTracker).toBeUndefined()
})

it('does not pass progressCalculator (uses handler default)', () => {
it('uses BatchedStepProgressCalculator', () => {
AbstractBatchEditJob.rehydrate([jobRun(42, 'studio_ee_job_patch_elements')])
const opts = HandlerMock.mock.calls.at(-1)![0]
expect(opts.progressCalculator).toBeUndefined()
expect(opts.progressCalculator).toBeInstanceOf(BatchedStepProgressCalculator)
})
})

Expand Down Expand Up @@ -477,7 +478,7 @@ describe('ZipUploadJob: run() matches rehydrate() structurally', () => {
})

describe('AbstractBatchEditJob: run() matches rehydrate() structurally', () => {
it('produces identical title, stepTracker (none) and progressCalculator (none)', async () => {
it('produces identical title, stepTracker (none) and BatchedStepProgressCalculator', async () => {
const job = new TestableBatchEditJob({ assetContextId: 1, refreshGrid: async () => {} })
await job.run({ messageBus: mockBus as any })
const runSnapshot = structuralSnapshot(HandlerMock.mock.calls.at(-1)![0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { isNil } from 'lodash'
import trackError, { GeneralError } from '@Pimcore/modules/app/error-handler'
import { type JobInterface, type JobRunOptions } from '../job-interface'
import { MessageBusJobHandler, type JobCompletionData } from '../../message-handlers/message-bus-job/message-bus-job-handler'
import { BatchedStepProgressCalculator } from '../../message-handlers/message-bus-job/progress-calculator/batched-step-progress-calculator'
import { type JobButtonCustomizationContext } from '../../message-handlers/message-bus-job/message-bus-job-notification'
import { t } from 'i18next'
import { type RehydratableJob, type JobRunList } from '../../services/job-rehydration-registry'
Expand Down Expand Up @@ -109,6 +110,7 @@ export abstract class AbstractBatchEditJob implements JobInterface {
return new MessageBusJobHandler({
jobRunId: options.jobRunId,
title: t('batch-edit.job-title'),
progressCalculator: new BatchedStepProgressCalculator(),
onJobCompletion: options.onJobCompletion,
onRetry: options.onRetry,
onCustomizeButtons: options.onCustomizeButtons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import trackError, { ApiError, GeneralError } from '@Pimcore/modules/app/error-h
import { type JobInterface, type JobRunOptions } from '../job-interface'
import { type ElementType } from '@Pimcore/types/enums/element/element-type'
import { MessageBusJobHandler } from '../../message-handlers/message-bus-job/message-bus-job-handler'
import { BatchedStepProgressCalculator } from '../../message-handlers/message-bus-job/progress-calculator/batched-step-progress-calculator'
import { api, type TagBatchOperationToElementsByTypeAndIdApiArg } from '@Pimcore/modules/element/editor/shared-tab-manager/tabs/tags/tags-api-slice-enhanced'
import { t } from 'i18next'
import { type RehydratableJob, type JobRunList } from '../../services/job-rehydration-registry'
Expand Down Expand Up @@ -99,7 +100,8 @@ export class TagAssignJob implements JobInterface {
}): MessageBusJobHandler {
return new MessageBusJobHandler({
jobRunId: options.jobRunId,
title: t(titleKeyByOperation[options.operation])
title: t(titleKeyByOperation[options.operation]),
progressCalculator: new BatchedStepProgressCalculator()
})
}
}
Expand Down
23 changes: 0 additions & 23 deletions public/build/2a4f4ced-d90d-4799-9be6-c8928a8c6208/entrypoints.json

This file was deleted.

Loading
Loading