Some more inline comments and cosmetic changes.

This commit is contained in:
Johannes Findeisen 2022-10-03 12:31:47 +02:00
commit 6b89907ee7
3 changed files with 6 additions and 6 deletions

View file

@ -34,7 +34,7 @@ from linspector.core.monitors import Monitors
# i currently only increase the 3rd number because the goal is that 0.19 will become the first
# stable version.
__version__ = '0.19.25.dev1'
__version__ = '0.19.26.dev1'
__author__ = 'Johannes Findeisen <you@hanez.org>'
logger = logging.getLogger('linspector')

View file

@ -27,11 +27,11 @@ start_scheduler = true
; multiple processes, thread mode will run only one process with multiple threads. maybe this can be combined to run
; multiple processes with multiple threads... dont know this actually but reading the APScheduler documentation will
; explain this.... :) default is "thread" but Linspector will only run on one CPU core then. default threads are 1024
; but this can be set much higher here.
; but this can be set much higher here. this should be minimal set to the number of monitors you are running.
scheduler_mode = process
max_threads = 3500
; i recommend to set this to your number of cpu cores available when running on a dedicated linspector host. but if the
; system is running other services you should lower this value when you have too high cpu load.
max_threads = 2048
; i recommend to set this to your number of CPU cores available when running on a dedicated Linspector host. but if the
; system is running other services you should lower this value when you have too high CPU load.
max_processes = 24
; if timezone is not set, UTC is used by default.
timezone = CET

View file

@ -14,8 +14,8 @@ def log(level, msg):
import inspect
from_stack = inspect.stack()[1]
function_name = from_stack.function
module_name = inspect.getmodule(from_stack[0]).__name__
line_number = str(from_stack.lineno)
module_name = inspect.getmodule(from_stack[0]).__name__
if level == 'critical':
logger.critical('[' + module_name + ']:[' + function_name + ']:[' + line_number + '] ' +
str(msg))