Automatic Git Cache Maintenance- Scheduling Maintenance Tasks

27 views
Skip to first unread message

Hrushikesh Rao

unread,
Jun 16, 2022, 6:06:13 PM6/16/22
to jenkin...@googlegroups.com
Hello World,

I am currently working on the Automatic Git Cache Maintenance Project under GSoC 2022. The aim of the project is to integrate git maintenance command to Jenkins to optimize the caches present on the Jenkins Controller.

Administrators can schedule various maintenance tasks by entering CronSytax in the UI. The data entered is stored internally in an XML file. I am confused between PeriodicWork/AsyncPeriodicWork to schedule the maintenance tasks.

The way I am thinking to implement is to extend this class and check every minute whether any of the maintenance task satisfy the cronSyntax entered by the administrator. If the current time satisfies the cronSyntax of a particulat task, then that task is added to a queue.

I am planning to create another thread which consumes the maintenance tasks present in the queue. The reason for creating another thread is to not block the thread which validates and pushes the maintenance task into the queue. The javadoc of PeriodicWork suggests to use it if the work done is short. I am more inclined towards using PeriodicWork. However, I am not sure about the performance.

I am not sure if this is the best approach and looking for help from the community. Open to suggestions and discussion.

Thank You

Hrushikesh Rao



https://javadoc.jenkins.io/hudson/model/PeriodicWork.html
https://javadoc.jenkins.io/hudson/model/AsyncPeriodicWork.html

P0512 Hrushikesh

unread,
Jun 16, 2022, 6:08:40 PM6/16/22
to Jenkins Developers
I messed up the links in the mail.
Reply all
Reply to author
Forward
0 new messages