forgotten fixes

This commit is contained in:
Evgenii Alekseev 2017-03-08 05:44:59 +03:00
parent 2701e44119
commit 01d5d99e16
3 changed files with 8 additions and 3 deletions

View File

@ -147,7 +147,8 @@ const QueuedSettingsDefaultMap QueuedSettingsDefaults = {
{"ProcessCommandLine", {"ProcessCommandLine",
{QueuedSettings::ProcessCommandLine, {QueuedSettings::ProcessCommandLine,
"systemd-run\x01--scope\x01--unit={name}\x01--uid={uid}\x01--gid={gid}" "systemd-run\x01--scope\x01--unit={name}\x01--uid={uid}\x01--gid={gid}"
"\x01-p\x01CPUQuota={cpu}%\x01-p\x01MemoryHigh={memory}\x01{app}"}}}; "\x01-p\x01CPUQuota={cpu}%\x01-p\x01MemoryHigh={memory}\x01{"
"application}"}}};
}; };
#endif /* QUEUEDCONFIGURATION_H */ #endif /* QUEUEDCONFIGURATION_H */

View File

@ -232,7 +232,11 @@ public:
* @brief set process line * @brief set process line
* @param _processLine * @param _processLine
* original process line * original process line
* @remark the following values will be replaced * @remark values in {} will be replaced
* 1. Property names, like {name}, {uid}, etc
* 2. {cpu} will be replaced to QueuedSystemInfo::cpuWeight(limit) in %
* 3. {memory} will be replaced to limit
* 4. {application} will be replaced to application line and arguments
*/ */
void setProcessLine(const QString &_processLine); void setProcessLine(const QString &_processLine);
/** /**

View File

@ -92,7 +92,7 @@ void QueuedProcess::updateArguments()
// command line // command line
QString commandLine = command() + "\x01" + commandArguments().join('\x01'); QString commandLine = command() + "\x01" + commandArguments().join('\x01');
application.replace("{app}", commandLine); application.replace("{application}", commandLine);
QStringList arguments = application.split('\x01'); QStringList arguments = application.split('\x01');