Differences From Artifact [1de71c0be2]:
- File src/loadctrl.c — part of check-in [0e83ca88ce] at 2020-12-22 12:13:39 on branch body-feature-class — Removed the parameter from style_finish_page() since the resulting content div class is now redundant with respect to the body class. This potentially breaks CSS made against old class names that a prior commit on this branch changed, but such skins would be made against an unreleased version of Fossil, it's unlikely many are using that first version of the feature anyway, and most of the class names did *not* change unless you were targeting a "div" instead of "body" or just a generic class name. None of the shipping skins are affected. (user: wyoung size: 1801) [more...]
To Artifact [9ee013b49d]:
- File src/loadctrl.c — part of check-in [57cdf4f2b9] at 2022-04-14 17:12:26 on branch load-control-rework — Exempt admin and setup users from the load_control() restriction. (user: stephan size: 1883)
| ︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | + + + + + |
/*
** Abort the current operation of the load average of the host computer
** is too high.
*/
void load_control(void){
double mxLoad = atof(db_get("max-loadavg", 0));
if( mxLoad<=0.0 || mxLoad>=load_average() ) return;
login_check_credentials();
if(g.perm.Admin || g.perm.Setup){
return;
}
style_set_current_feature("test");
style_header("Server Overload");
@ <h2>The server load is currently too high.
@ Please try again later.</h2>
@ <p>Current load average: %f(load_average()).<br />
@ Load average limit: %f(mxLoad)</p>
|
| ︙ |