- Introduce a Redis-based lock to prevent concurrent execution of batch generation tasks. - Set a TTL of 300 seconds for the lock to ensure it is released after a timeout. - Add logging for situations where a task is already in progress. This enhancement ensures that batch tasks do not overlap, which can lead to data inconsistencies and resource contention. The locking mechanism improves the reliability of the batch processing system. |
||
---|---|---|
.. | ||
data | ||
tasks |