BatchJobService
internal.internal.BatchJobService
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>batchJobStatusMapToProps
Map<BatchJobStatus, { entityColumnName: string ; eventType: string }>Requiredmanager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredEvents
objectRequiredEvents.CANCELED
stringRequiredEvents.COMPLETED
stringRequiredEvents.CONFIRMED
stringRequiredEvents.CREATED
stringRequiredEvents.FAILED
stringRequiredEvents.PRE_PROCESSED
stringRequiredEvents.PROCESSING
stringRequiredEvents.UPDATED
stringRequiredAccessors
activeManager_
Protected
get
activeManager_(): EntityManager
Returns
EntityManager
EntityManager
EntityManagerRequiredInherited from
TransactionBaseService.activeManager_
Methods
atomicPhase_
Protected
atomicPhase_<TResult
, TError
>(work
, isolationOrErrorHandler?
, maybeErrorHandlerOrDontFail?
): Promise
<TResult
>
Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created.
TResult
objectRequiredTError
objectRequiredParameters
work
(transactionManager: EntityManager) => Promise<TResult>RequiredisolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Returns
Promise
<TResult
>
Promise
Promise<TResult>RequiredInherited from
TransactionBaseService.atomicPhase_
cancel
cancel(batchJobOrId
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
complete
complete(batchJobOrId
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
confirm
confirm(batchJobOrId
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
create
create(data
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
listAndCount
listAndCount(selector?
, config?
): Promise
<[BatchJob
[], number
]>
Parameters
selector
FilterableBatchJobPropsconfig
FindConfig<BatchJob>Returns
Promise
<[BatchJob
[], number
]>
prepareBatchJobForProcessing
prepareBatchJobForProcessing(data
, req
): Promise
<CreateBatchJobInput
>
Parameters
req
Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>RequiredReturns
Promise
<CreateBatchJobInput
>
retrieve
retrieve(batchJobId
, config?
): Promise
<BatchJob
>
Parameters
batchJobId
stringRequiredconfig
FindConfig<BatchJob>Returns
Promise
<BatchJob
>
setFailed
setFailed(batchJobOrId
, error?
): Promise
<BatchJob
>
Parameters
error
string | BatchJobResultErrorReturns
Promise
<BatchJob
>
setPreProcessingDone
setPreProcessingDone(batchJobOrId
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
setProcessing
setProcessing(batchJobOrId
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
shouldRetryTransaction_
Protected
shouldRetryTransaction_(err
): boolean
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
boolean
booleanInherited from
TransactionBaseService.shouldRetryTransaction_
update
update(batchJobOrId
, data
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
updateStatus
Protected
updateStatus(batchJobOrId
, status
): Promise
<BatchJob
>
Parameters
Returns
Promise
<BatchJob
>
withTransaction
withTransaction(transactionManager?
): BatchJobService
Parameters
transactionManager
EntityManager