better broodlord num computation

This commit is contained in:
Unbit
2013-03-06 19:55:20 +01:00
parent 56a79ae09c
commit 2ae323feee
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -591,6 +591,10 @@ void emperor_add(struct uwsgi_emperor_scanner *ues, char *name, time_t born, cha
}
}
if (n_ui->zerg) {
uwsgi.emperor_broodlord_num++;
}
// TODO pre-start hook
// a new uWSGI instance will start
@@ -655,7 +659,7 @@ void emperor_add(struct uwsgi_emperor_scanner *ues, char *name, time_t born, cha
// add UWSGI_BROODLORD_NUM
if (n_ui->zerg) {
uef = uwsgi_num2str(uwsgi.emperor_broodlord_count);
uef = uwsgi_num2str(uwsgi.emperor_broodlord_num);
if (setenv("UWSGI_BROODLORD_NUM", uef, 1)) {
uwsgi_error("setenv()");
exit(1);
+1
View File
@@ -1604,6 +1604,7 @@ struct uwsgi_server {
pid_t emperor_pid;
int emperor_broodlord;
int emperor_broodlord_count;
uint64_t emperor_broodlord_num;
char *emperor_stats;
int emperor_stats_fd;
struct uwsgi_string_list *vassals_templates;