Practical Tutorial on Qeasy: Implementing a Scheduled Cleanup Strategy for Integration Queues and Logs
What This Strategy Solves
In supply-chain integration scenarios hosted on the Qeasy Data Integration Platform, request queues, execution logs, and debug snapshots accumulate continuously as business documents keep syncing. In one of our real projects, after three months of going live, a retail customer's daily log volume was approaching the storage alert threshold, and historical queues slowed down troubleshooting so much that ops engineers had to clean things up by hand. This strategy is designed exactly for that case — it automatically purges all queues and logs from the previous day at a scheduled time each morning, keeping the platform lightweight and observable.
Data Flow and Field Mapping
This is a platform self-maintenance strategy. The data flow forms a closed loop inside the platform and does not write into any business database.
| Layer | System / Component | Interface / Action | Key Fields | Notes |
|---|---|---|---|---|
| Source | Qeasy Data Integration Platform | WebAPI / POST / DeleteExceptData | target_1 (solutions to process) | Calls the platform's built-in cleanup API, passing in the solution objects |
| Middle | Qeasy scheduling engine | Internal routing & execution context | datetime, params (auto-filled response) | Populated automatically by autoFillResponse |
| Target | Qeasy Data Integration Platform | Write no-op / POST | empty request body, empty response body | Marks the flow as successfully executed to avoid idle spinning |
As you can see, the source side is the real cleanup action, while the target side is just a placeholder write. This is the typical pattern for "system maintenance" strategies on Qeasy.
How to Configure It on Qeasy
When configuring this strategy on the Qeasy Data Integration Platform, we usually follow these points:
- Strategy type: choose SYNC, mark the business module as "System Maintenance" so it's easy to spot in the strategy list later.
- Source metadata: pick
DeleteExceptDataas the API, type WebAPI, effect QUERY, method POST, enable idCheck and autoFillResponse so the response fields are filled in automatically and you can read datetime and params directly during debugging. - Target metadata: use the "write no-op" action with empty request and response arrays. Its purpose is to push the flow status to COMPLETED so that downstream dependent strategies do not time out waiting.
- Request parameters: expose
target_1(the solutions to process) as a visual input so that ops engineers can specify the cleanup scope from the Qeasy UI instead of hardcoding it in scripts — this is the standard Qeasy pattern of centralized mapping management. - Dependencies: leave
depends_onempty. This strategy is an independent operations task and should not be blocked by business sync chains.
Implementation Steps
We split the rollout into a three-phase schedule for a safe go-live:
- Incremental starting point (manual trigger on day 1): run the strategy once manually on Qeasy, observe the queue and log volume after cleanup, and only move on to scheduled execution once you have confirmed the result. This step matters because DeleteExceptData is non-reversible.
- Transition before full automation: set the crontab to
3 1 * * *(01:03 every day) and run it under low traffic for three days while watching storage usage curves, search latency, and whether downstream alerts disappear. - Steady-state frequency: once everything looks healthy, set the target-side "no-op" crontab to
23 2 * * *(02:23 every day). This produces a serial cadence — the source cleans up first, then the target marks completion — so the flow does not stay in RUNNING for long.
The whole window sits in the early-morning business trough and does not compete with sales order or material syncs for platform resources.
Pitfalls We Have Seen
- A classic mistake is attaching the cleanup action to a business chain. A team once placed DeleteExceptData right after a sales order sync; when the business side failed, cleanup was skipped too, and logs kept piling up. The safe approach is to use a standalone strategy with empty
depends_on, decoupling ops from business. - Running without target_1 ends up clearing everything. One project skipped passing the solution object to save time and accidentally wiped out queues that were still running that night, causing the entire early-morning schedule to fail. On Qeasy, always pass
target_1explicitly and keep production and pre-production strictly separated. - Disabling autoFillResponse makes troubleshooting blind. Once it is off, datetime and params in the response are empty and you cannot tell whether the cleanup really happened. Always keep it on.
- Do not replace the target no-op with a real write. Some engineers try to swap the "write no-op" for a write into a real log table, which introduces an extra write path and brings no benefit. The no-op exists precisely to close the flow status cleanly.
- Cramming crontabs too close together. Triggering the source at 01:03 and the target at 02:23 leaves enough buffer for the Qeasy scheduling engine to handle cross-node dependencies and retries.
When to Use It and When Not To
Use it when integration chains are long, logs and queues grow quickly, you need a daily rolling cleanup in a public-cloud production environment, or your team wants to make ops actions visual and low-code via the Qeasy Data Integration Platform. Do not use it in compliance scenarios that require long-term retention of historical logs, in cases that need fine-grained per-document retention windows, or in environments where the Qeasy platform is not available as the carrier.