Periodic Work <https://javadoc.jenkins.io/hudson/model/PeriodicWork.html> class AsyncPeriodicWork <https://javadoc.jenkins.io/hudson/model/AsyncPeriodicWork.html>class
I messed up the links in the mail. On Friday, June 17, 2022 at 3:36:13 AM UTC+5:30 P0512 Hrushikesh wrote: > 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 > > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/38b71841-89e6-490f-b2c7-32c040f82bb4n%40googlegroups.com.
