Files
OMS/app/base/dbschema/queue.php
2025-12-28 23:13:25 +08:00

140 lines
3.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
$db['queue']=array (
'columns' =>
array (
'queue_id' =>
array (
'type' => 'bigint(20)',
'required' => true,
'pkey' => true,
'extra' => 'auto_increment',
'label' => 'ID',
'editable' => false,
),
'queue_title' =>
array (
'type' => 'varchar(50)',
'label'=>app::get('base')->_('队列名称'),
'required' => true,
'is_title'=>true,
'in_list'=>true,
'width'=>300,
'default_in_list'=>true,
),
'status'=>array(
'label'=>app::get('base')->_('状态'),
'type'=>array(
'running'=>app::get('base')->_('运行中'),
'hibernate'=>app::get('base')->_('休眠中'),
'paused'=>app::get('base')->_('已暂停'),
'failure'=>app::get('base')->_('执行失败'),
),
'required' => true,
'default' => 'hibernate',
'in_list'=>true,
'width'=>100,
'default_in_list'=>true,
),
'worker'=>array(
'type' => 'varchar(200)',
'required' => true,
//'in_list'=>true,
'width'=>200,
//'default_in_list'=>true,
),
'start_time'=>array(
'type' => 'time',
'label'=>app::get('base')->_('任务产生时间'),
'required' => true,
'in_list'=>true,
'width'=>150,
// 'default_in_list'=>true,
),
'worker_active'=>array(
'type' => 'time',
'label'=>app::get('base')->_('上次运行时间'),
'in_list'=>true,
'width'=>150,
'default_in_list'=>true,
),
'total'=>array(
'type' => 'number',
'label'=>app::get('base')->_('队列长度'),
'in_list'=>true,
'width'=>120,
'default_in_list'=>true,
),
'remaining'=>array(
'type' => 'number',
'label'=>app::get('base')->_('剩余任务'),
'in_list'=>true,
'width'=>120,
'default_in_list'=>true,
),
'cursor_id'=>array(
'type' => 'varchar(255)',
'label'=>app::get('base')->_('执行游标'),
'default'=>0,
'required' => true,
),
'runkey'=>array(
'type' => 'char(32)',
),
'task_name'=>array(
'type' => 'varchar(50)',
'label'=>app::get('base')->_('永久任务名称'),
),
'params'=>array(
'type' => 'serialize',
'label'=>app::get('base')->_('参数'),
'required' => true,
'comment'=>app::get('base')->_('参数通常就是filter'),
),
'errmsg'=>array(
'type' => 'varchar(255)',
'default_in_list'=>true,
'in_list'=>true,
'width'=>300,
'label'=>app::get('base')->_('错误信息'),
),
),
'index' =>
array (
'ind_worker' =>
array (
'columns' =>
array (
0 => 'worker',
),
),
'ind_worker_active' =>
array (
'columns' =>
array (
0 => 'worker_active',
),
),
'ind_status' =>
array (
'columns' =>
array (
0 => 'status',
),
),
),
'comment' => '对列表',
'engine' => 'innodb',
'version' => '$Rev: 40912 $',
'ignore_cache' => true,
);
//需要id从大到小的执行