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

Closed
opened 2020-09-13 19:50:13 +02:00 by realkinetix · 4 comments
realkinetix commented 2020-09-13 19:50:13 +02:00 (Migrated from github.com)

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);
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 2020-09-13 23:01:21 +02:00 (Migrated from github.com)

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

This looks good, do you want to submit a PR in your name?
realkinetix commented 2020-09-14 00:29:58 +02:00 (Migrated from github.com)

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

I guess I probably should! I'll get on that.
realkinetix commented 2020-09-14 01:25:05 +02:00 (Migrated from github.com)

Thank you for forcing me to practice git!

Thank you for forcing me to practice git!
MrPetovan commented 2020-09-14 04:26:58 +02:00 (Migrated from github.com)

Thank you for your work!

Thank you for your work!
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: friendica/friendica-directory#53
No description provided.