mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
remove unnecessary exit conditions
This commit is contained in:
@@ -89,32 +89,28 @@ db_dbname = config['db_name']
|
|||||||
try:
|
try:
|
||||||
amount_of_workers = int(config['poller_service_workers'])
|
amount_of_workers = int(config['poller_service_workers'])
|
||||||
if amount_of_workers == 0:
|
if amount_of_workers == 0:
|
||||||
log.critical("ERROR: 0 threads is not a valid value")
|
amount_of_workers = 16
|
||||||
sys.exit(2)
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
amount_of_workers = 16
|
amount_of_workers = 16
|
||||||
|
|
||||||
try:
|
try:
|
||||||
poll_frequency = int(config['poller_service_poll_frequency'])
|
poll_frequency = int(config['poller_service_poll_frequency'])
|
||||||
if poll_frequency == 0:
|
if poll_frequency == 0:
|
||||||
log.critical("ERROR: 0 seconds is not a valid value")
|
poll_frequency = 300
|
||||||
sys.exit(2)
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
poll_frequency = 300
|
poll_frequency = 300
|
||||||
|
|
||||||
try:
|
try:
|
||||||
discover_frequency = int(config['poller_service_discover_frequency'])
|
discover_frequency = int(config['poller_service_discover_frequency'])
|
||||||
if discover_frequency == 0:
|
if discover_frequency == 0:
|
||||||
log.critical("ERROR: 0 seconds is not a valid value")
|
discover_frequency = 21600
|
||||||
sys.exit(2)
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
discover_frequency = 21600
|
discover_frequency = 21600
|
||||||
|
|
||||||
try:
|
try:
|
||||||
down_retry = int(config['poller_service_down_retry'])
|
down_retry = int(config['poller_service_down_retry'])
|
||||||
if down_retry == 0:
|
if down_retry == 0:
|
||||||
log.critical("ERROR: 0 seconds is not a valid value")
|
down_retry = 60
|
||||||
sys.exit(2)
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
down_retry = 60
|
down_retry = 60
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user