OCA / oca-github-bot

The GitHub Bot of the Odoo Community Association (OCA)
MIT License
39 stars 57 forks source link

Don't run nightly main branch tasks when they have not changed #238

Open sbidoul opened 1 year ago

sbidoul commented 1 year ago

Is your feature request related to a problem?

Over time, with the number of repos and branches growing, the main branch bot is taking longer and longer. Since it fills the queue, some more important commands wait for a long time before being executed.

Describe the solution you'd like

An "easy" optimization would be to cache the last commit processed and not re-run the main branch task if the head of the branch has not changed.

Describe alternatives you've considered

Additional context

Related to #235

sbidoul commented 1 year ago

Using redis to store the commits of the branches we have processed would be ideal.

pedrobaeza commented 1 year ago

This morning the commands have been processed before. I thought you did something already...

sbidoul commented 1 year ago

This night weblate has been quiet with a much lower load on the machine, that's why the nightly bot jobs finished earlier.