Skip to content

Make the task pull frequency dependant on the pull_frequency from Rails

Ravi Kumar requested to merge increase-tasks-frequency into main

What does this MR do and why?

This MR is changing the pull task frequency. The pulling frequency will be given in the Tasks API as an attribute pull_frequency. If this is provided it will send the GET tasks request with that frequency. if this attribute is not present in the response, it will fall back to the default pulling frequency which is 10s. We have added an internal ticker interval internalInterval which is 100ms. Under this ticket block, we have added a logic to send the GET tasks request at the interval which will be provided by the Rails in the API response.

How to set up and validate locally

  • Run Zoekt indexer in GDK mode
  • Observe the tasks log in the terminal is at the interval of 10s
  • Now enable the FF zoekt_reduced_pull_frequency. And observe again the tasks log in the terminal. Now it should be at the interval of 500ms.
Edited by Ravi Kumar

Merge request reports

Loading