friendica / friendica-directory

Global directory for the Friendica project. The repository has moved to git.friendi.ca/friendica/friendica-directory
GNU Affero General Public License v3.0
20 stars 11 forks source link

Server health score calculation overwrites $max_health if server is dev or rc #53

Closed realkinetix closed 3 years ago

realkinetix commented 3 years ago

In src/Classes/Pollers/Server.php, at lines 370/371 in function computeHealthScore, if server's version is dev or RC, previous settings of $max_health are overwritten with $max_health = 95.

I have "fixed" this with this chunk of very-possibly-an-inefficient-way-of-doing-this:

$old_max_health = $max_health;
$new_max_health = 95; //Develop/RC can be unstable
$max_health = min($old_max_health, $new_max_health);
MrPetovan commented 3 years ago

This looks good, do you want to submit a PR in your name?

realkinetix commented 3 years ago

I guess I probably should! I'll get on that.

realkinetix commented 3 years ago

Thank you for forcing me to practice git!

MrPetovan commented 3 years ago

Thank you for your work!