Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fairness cache update #31

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

rasmi-aw
Copy link

@rasmi-aw rasmi-aw commented Dec 6, 2022

Hello @syphax-bouazzouni @EamdouniGIT @jonquet , i hope you're doing good, Fairness results file can be updated externally by whether a job or command, now i just made it auto updating every 12 hours (Configurable), without the interference of anybody, which means by the easiest way recalculating the results every 12 hours, this will help in case of a not working script etc...

(deleting the cache file is triggered by an http request (normal fetch fair requests))

Thanks.

@syphax-bouazzouni
Copy link
Collaborator

Hi,

OK a really good contribution 👍

I will review the code and merge it after,

For now here are some remarks:

When you do a PR, it really important to tell the current context and the what, how and why of you work explicitly (it is even more important when you speak to no technical people)

In your case:

Context (How the current cache works ?)

Currently there is a cron job (a linux script) that each night delete the fairness cache file.
And like the fairness service check at each request the existence of the cache file to use it, if it can't be found he regenerate it and so the cache is renewed.

The issue (the why)

To make this work we need an external script (that needed to be installed in the deployed system),

What and how

This PR make the fairness service remove by his own the cache file (without an external script job) after an amount of time (UPDATE_RATE variable)

@syphax-bouazzouni syphax-bouazzouni self-requested a review December 6, 2022 13:28
@syphax-bouazzouni syphax-bouazzouni self-assigned this Dec 6, 2022
@syphax-bouazzouni syphax-bouazzouni added the enhancement New feature or request label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants