diff options
| author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-08-01 09:38:44 +0000 |
|---|---|---|
| committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-08-01 09:38:44 +0000 |
| commit | 8c0061780ec40dec2b08c3c6e00840236a3445a0 (patch) | |
| tree | 7d73a68826162f8f7a27a716fb6dd88d83b0f4c1 /src/zabbix_server/escalator | |
| parent | 03c1f7d36286e83e37bf3eaf2ad2ef8ea826969e (diff) | |
| download | zabbix-8c0061780ec40dec2b08c3c6e00840236a3445a0.tar.gz zabbix-8c0061780ec40dec2b08c3c6e00840236a3445a0.tar.xz zabbix-8c0061780ec40dec2b08c3c6e00840236a3445a0.zip | |
- [DEV-173] Escalations
removed get_minnextcheck() function
git-svn-id: svn://svn.zabbix.com/trunk@5860 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/escalator')
| -rw-r--r-- | src/zabbix_server/escalator/escalator.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/zabbix_server/escalator/escalator.c b/src/zabbix_server/escalator/escalator.c index 30228e26..3145a88d 100644 --- a/src/zabbix_server/escalator/escalator.c +++ b/src/zabbix_server/escalator/escalator.c @@ -29,7 +29,7 @@ #include "../events.h" #include "../actions.h" -#define CONFIG_ESCALATOR_FREQUENCY 5 +#define CONFIG_ESCALATOR_FREQUENCY 3 #define ZBX_USER_MSG struct zxb_user_msg_t ZBX_USER_MSG @@ -616,7 +616,7 @@ static void process_escalations(int now) * Comments: * * * ******************************************************************************/ -static int get_minnextcheck() +/*static int get_minnextcheck() { DB_RESULT result; DB_ROW row; @@ -648,7 +648,7 @@ static int get_minnextcheck() DBfree_result(result); return res; -} +}*/ /****************************************************************************** * * @@ -667,7 +667,7 @@ static int get_minnextcheck() ******************************************************************************/ int main_escalator_loop() { - int now, nextcheck, sleeptime; + int now/*, nextcheck, sleeptime*/; double sec; struct sigaction phan; @@ -692,7 +692,7 @@ int main_escalator_loop() sec = zbx_time() - sec; - nextcheck = get_minnextcheck(); +/* nextcheck = get_minnextcheck(); if (FAIL == nextcheck) sleeptime = CONFIG_ESCALATOR_FREQUENCY; @@ -702,19 +702,23 @@ int main_escalator_loop() sleeptime = 0; else if (sleeptime > CONFIG_ESCALATOR_FREQUENCY) sleeptime = CONFIG_ESCALATOR_FREQUENCY; - } + }*/ zabbix_log(LOG_LEVEL_DEBUG, "Escalator spent " ZBX_FS_DBL " seconds while processing escalation items." " Nextcheck after %d sec.", sec, - sleeptime); + CONFIG_ESCALATOR_FREQUENCY); - if (sleeptime > 0) { + zbx_setproctitle("escalator [sleeping for %d seconds]", + CONFIG_ESCALATOR_FREQUENCY); + + sleep(CONFIG_ESCALATOR_FREQUENCY); +/* if (sleeptime > 0) { zbx_setproctitle("escalator [sleeping for %d seconds]", sleeptime); sleep(sleeptime); - } + }*/ } /* Never reached */ |
