Add pagination to JobModel ListView in Quartz Addon in Jmix 2.x

Hi Jmix team! :wave:

First of all, thank you for the great work you’re doing on the platform — it keeps getting better and more powerful! :rocket:

I was wondering if pagination for the Quartz add-on (in job-model-list-view.xml) is something that might be considered for the roadmap. It would really help with scalability on the /quartz/jobmodels page, especially in environments where a large number of jobs have been executed and the list grows quite big.

Additionally, would it be possible to introduce a generic “retention” job implementation? The idea would be to periodically clean up configured “old” entities based on a SpEL condition (for example using creationDate or a similar field). This could potentially be applied to Quartz job models as well, even though they are not standard Jmix entities.

I think this could be a useful built-in mechanism for keeping datasets lean over time and reducing manual maintenance.

Thanks in advance for your feedback, and keep up the amazing work! :blush:

Best regards,
Ale

Hi Alessandro,

Thanks for your suggestions.

Pagination

The current issue is that Quartz doesn’t have pagination API. And using direct access to Quartz table without Quartz API doesn’t look like a good idea for now.
A possible minimal solution is to create a “fake” pagination - internally it will still load all jobs, but render them as multiple pages.

Do you need jobs pagination just for UX improvement or you have some performance issues with that list because of large amount of jobs? How many jobs do you have (scale)?

Retention Job

Did you mean to implement some OOB job class with logic to remove another jobs specifically? Or some general logic to remove any entities by provided condition?

If it’s the latter - it’s not a good idea. To “dangerous”, to many possible details. Different entities can have different management approaches. I don’t see how we can generalize it. Project side is responsible for project entities.

If we talk about Jobs only - can you provide actual scenarios you want to have (if you have some)?

In theory it’s possible to apply SpEL to Job model, but maybe it’s better to provide only predefined conditions, not the “full” control. Any of that can be provided as a Job parameters. Need to review.

Both features have a chance to be implemented (the second one - less likely), but I can’t give any timeline.

Regards,
Ivan