otto-de / edison-microservice

Collection of independent libraries on top of Spring Boot to provide a faster setup of jvm microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[edison-jobs] Limit number of preserved log entries

christianpohlmann7111 opened this issue · comments

We observed a case where the number of log entries was too large for a mongo document resulting in an error to save it to the jobInfo collection.

We would like to optionally be able to limit the number of preserved log entries per job, for instance by only saving the last N entries.

I implemented a cleanup strategy that helps if a job is moving towards the MongoDB document size limit. In that case, only the last 1000 Job Messages are kept and the Job can go on. It's in Release 2.2.10.

An option to generally just keep the last N entries is still a TODO.