cosmetic fix

This commit is contained in:
Alexey Avramov 2018-07-22 06:45:20 +09:00
parent db1773a826
commit d8f606ecc6
2 changed files with 12 additions and 15 deletions

4
nohang
View File

@ -483,14 +483,14 @@ try:
c = line.startswith('\t')
d = line.startswith(' ')
etc = line.startswith('**')
etc = line.startswith('$ETC')
if not a and not b and not c and not d and not etc:
a = line.split('=')
config_dict[a[0].strip()] = a[1].strip()
if etc:
a = line[2:].split('::')
a = line[4:].split('///')
etc_name = a[0].strip()
etc_command = a[1].strip()
if len(etc_name) > 15:

View File

@ -168,23 +168,20 @@ avoid_factor = 3
execute_the_command = False
The length of the process name can't exceed 15 characters.
The syntax is as follows: lines starting with ** are considered
as the lines containing names of processes and corresponding
commands. After a name of process the double colon (::) follows.
And then follows the command that will be executed if the
specified process is selected as a victim.
The ampersand (&) at the end of the command will allow nohang to
The syntax is as follows: lines starting with keyword $ETC are
considered as the lines containing names of processes and
corresponding commands. After a name of process the triple slash
(///) follows. And then follows the command that will be
executed if the specified process is selected as a victim. The
ampersand (&) at the end of the command will allow nohang to
continue runing without waiting for the end of the command
execution.
For example:
** mysqld :: systemctl restart mariadb.service &
** php-fpm7.0 :: systemctl restart php7.0-fpm.service
$ETC mysqld /// systemctl restart mariadb.service &
$ETC php-fpm7.0 /// systemctl restart php7.0-fpm.service
** processname :: some command
Extra sleep time after executing the command (in addition to
min_sleep_after_sigterm).
$ETC proc_name /// some command
#####################################################################
@ -222,7 +219,7 @@ root_display = :0
Для работы опции должны быть включены десктопные уведомления.
Valid values are True and False.
gui_low_memory_warnings = True
gui_low_memory_warnings = False
Минимальное время между отправками уведомлений в секундах.
Valid values are floating-point numbers from the range [1; 300].