File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,17 +112,17 @@ public function validationDefault(Validator $validator): Validator {
112112 * @param string $value
113113 * @param array<string, mixed> $context
114114 *
115- * @return bool
115+ * @return string| bool
116116 */
117- public function validateCount (string $ value , array $ context ): bool {
117+ public function validateCount (string $ value , array $ context ) {
118118 $ maxWorkers = Config::maxworkers ();
119119 if (!$ value || !$ maxWorkers ) {
120120 return true ;
121121 }
122122
123123 $ currentWorkers = $ this ->find ()->where (['server ' => $ value ])->count ();
124124 if ($ currentWorkers >= $ maxWorkers ) {
125- return false ;
125+ return ' Too many workers running ( ' . $ currentWorkers . ' / ' . $ maxWorkers . ' ). Check your `Queue.maxworkers` config. ' ;
126126 }
127127
128128 return true ;
You can’t perform that action at this time.
0 commit comments