mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
新增通用的虚拟数据模型;新增定时任务多进程;新增多进程阻塞模式的定时器;
This commit is contained in:
@@ -9,10 +9,25 @@ class TimerControllerBase extends ToolsController
|
||||
{
|
||||
protected $frequency = null;
|
||||
|
||||
protected $concurrency = 1;
|
||||
|
||||
protected $concurrencyId = 0;
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
|
||||
$concurrency_id = $this->request->param('concurrency_id', 0);
|
||||
if ($concurrency_id > $this->concurrency) {
|
||||
$this->error('concurrency id error');
|
||||
}
|
||||
$this->concurrencyId = $concurrency_id;
|
||||
|
||||
$concurrency_count = $this->request->param('concurrency_count', 1);
|
||||
if ($concurrency_count > $this->concurrency) {
|
||||
$this->error('concurrency count error');
|
||||
}
|
||||
|
||||
if (is_int($this->frequency)) {
|
||||
$this->protectVisit($this->frequency);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user