-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Issue captured: Some periodic tasks are no longer being executed at a time when the event queue task instance was manually restaged.Before that time all specific periodic task was executed successfully, and other non-periodic task seems like have possibility to have same behaviour.
Some fundings and question:
1.sap_eventqueue_Lock table is empty.
2.The indicated periodic task which was not executed has many old processing logs, all the status of event are 2(completed), with only one task remaining 0(open) and with 0 attemptTimestamp in sap_eventqueue_Event.
3.Other healthy period task which was normally completed ,but we can't find any latest logs in sap_eventqueue_Event, is that log will delay or something rewriting mechanism ?
4.We try to follow this function to clean up ,but it also seems not to be effected.
const registerCleanupForDevDb = async () => { if (!config.developmentMode) { return; } const tenantIds = config.isMultiTenancy ? await getAllTenantIds() : [null]; for (const tenantId of tenantIds) { await cds.tx({ tenant: tenantId }, async (tx) => { await tx.run(DELETE.from(config.tableNameEventLock)); await tx.run( UPDATE.entity(config.tableNameEventQueue).where({ status: EventProcessingStatus.InProgress }).set({ status: EventProcessingStatus.Error, }) ); }); } };
5.So we have met some issue that periodic task will be locked by any unexpected exit in processing, but we cant find any InProgress task in sap_eventqueue_Event in current issue.
Env:
Configuration
periodicEvents:
- type: ACTIVATION_DETECTION
subType: AI_ACTIVATION
impl: ./******/Processor.js
load: 1
interval: 3600
appNames:
- iron-event-queue-tasks
- type: ATTACHMENT_DETECTION
subType: OCR_JOB
impl: ./******/Processor.js
load: 1
interval: 120
appNames:
- iron-event-queue-tasks
```
```
@cap-js-community/event-queue@1.10.11
@sap/cds-shim@0.8.4
```
contact person: Star.Heng