Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ static public function parse(array $keys_rule, array $get_data): array
}
}

public function tableSearchAntdRender($options, $listBuilder): array
public function tableSearchAntdRender($options, $listBuilder): \AntdAdmin\Component\Table\ColumnType\SelectText
{
$key = new Select('key', $options['title']);
$key->setValueEnum($options['options']);

$word = new Text('word', '');
return [$key, $word];
$column = new \AntdAdmin\Component\Table\ColumnType\SelectText('key:word', '');
return $column->setValueEnum($options['options']);
}
}
25 changes: 25 additions & 0 deletions src/Library/Qscmf/Controller/HealthCheckController.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Qscmf\Controller;

use Think\Controller;

class HealthCheckController extends Controller
{
public function resque(){
$queue = I('get.queue');
if (!$queue){
$this->error('参数错误');
}

$tick = S('health_tick_queue_'.$queue);

if (time() - $tick > 60){
send_http_status(500);
echo 'ERROR: queue check fail - '.$queue;
return;
}

echo $tick. ' health check success.';
}
}
4 changes: 4 additions & 0 deletions src/Library/Qscmf/Lib/Tp3Resque/Resque/Worker.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ public function work($interval = 5)
break;
}

foreach ($this->queues as $queue) {
S('health_tick_queue_'.$queue, time());
}

$this->log("round start:" . convert(memory_get_usage(true)));

if (!$this->paused
Expand Down