Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading lang string #151

Open
matthewhilton opened this issue Oct 12, 2023 · 0 comments
Open

Misleading lang string #151

matthewhilton opened this issue Oct 12, 2023 · 0 comments
Assignees

Comments

@matthewhilton
Copy link
Contributor

matthewhilton commented Oct 12, 2023

Some of the lang string I believe were messed up, for e.g.

if ($lastrun != 0 && $lastrun <= (time() - $completiondelay * MINSECS)) {
$status = result::CRITICAL;
$messages .= get_string(
'latencynotrun',
'tool_heartbeat',
['task' => $taskclass, 'mins' => $startdelay]
) . PHP_EOL;
}

Code is checking if the lastruntime < $completiondelay, but the lang string outputs:

$string['latencynotrun'] = 'Task {$a->task} has not run within the configured latency threshold: {$a->mins}.';

But it should most likely be using this:

$string['latencyruntime'] = 'Task {$a->task} was last run with a runtime longer than the configured threshold: {$a->mins}.';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant