You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return SetupResult::success($this->l10n->n('No scheduled tasks in the last %n hour.', 'No scheduled tasks in the last %n hours.', self::TIME_SPAN));
48
+
return SetupResult::success(
49
+
$this->l10n->n(
50
+
'No scheduled tasks in the last day.',
51
+
'No scheduled tasks in the last %n days.',
52
+
$lastNDays
53
+
)
54
+
);
42
55
}
43
56
$slowCount = 0;
44
57
foreach ($tasksas$task) {
@@ -54,10 +67,23 @@ public function run(): SetupResult {
54
67
}
55
68
}
56
69
57
-
if ($slowCount / $taskCount < self::MAX_SLOW_PERCENTAGE) {
58
-
return SetupResult::success($this->l10n->n('The task pickup speed has been ok in the last %n hour.', 'The task pickup speed has been ok in the last %n hours.', self::TIME_SPAN));
70
+
if (($slowCount / $taskCount) < self::MAX_SLOW_PERCENTAGE) {
71
+
return SetupResult::success(
72
+
$this->l10n->n(
73
+
'The task pickup speed has been ok in the last day.',
74
+
'The task pickup speed has been ok in the last %n days.',
75
+
$lastNDays
76
+
)
77
+
);
59
78
} else {
60
-
return SetupResult::warning($this->l10n->n('The task pickup speed has been slow in the last %n hour. Many tasks took longer than 4 minutes to be picked up. Consider setting up a worker to process tasks in the background.', 'The task pickup speed has been slow in the last %n hours. Many tasks took longer than 4 minutes to be picked up. Consider setting up a worker to process tasks in the background.', self::TIME_SPAN), 'https://docs.nextcloud.com/server/latest/admin_manual/ai/overview.html#improve-ai-task-pickup-speed');
79
+
return SetupResult::warning(
80
+
$this->l10n->n(
81
+
'The task pickup speed has been slow in the last day. Many tasks took longer than 4 minutes to be picked up. Consider setting up a worker to process tasks in the background.',
82
+
'The task pickup speed has been slow in the last %n days. Many tasks took longer than 4 minutes to be picked up. Consider setting up a worker to process tasks in the background.',
0 commit comments