root/branches/release-30/lib/MT/TheSchwartz/Job.pm @ 1401

Revision 1401, 1.3 kB (checked in by bchoate, 21 months ago)

Adding index on priority column.

  • Property svn:keywords set to Id Revision
Line 
1# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
2# This program is distributed under the terms of the
3# GNU General Public License, version 2.
4#
5# $Id$
6
7package MT::TheSchwartz::Job;
8
9use strict;
10use base qw( MT::Object );
11
12__PACKAGE__->install_properties({
13    column_defs => {
14        jobid => 'integer not null auto_increment', # bigint unsigned primary key not null auto_increment
15        funcid => 'integer not null', # int unsigned not null
16        arg => 'blob', # mediumblob
17        uniqkey => 'string(255)', # varchar(255) null
18        insert_time => 'integer', # integer unsigned
19        run_after => 'integer not null', # integer unsigned not null
20        grabbed_until => 'integer not null', # integer unsigned not null
21        priority => 'integer', # smallint unsigned
22        coalesce => 'string(255)', # varchar(255)
23    },
24    datasource  => 'ts_job',
25    primary_key => 'jobid',
26    indexes => {
27        funcid => 1,
28        coalesce => 1,
29        uniqkey => 1,
30        run_after => 1,
31        priority => 1,
32        uniqfunc => {
33            columns => [ 'funcid', 'uniqkey' ],
34            unique => 1,
35        },
36    },
37    # not captured (but indexed separately)
38    # INDEX (funcid, run_after),
39    # INDEX (funcid, coalesce)
40});
41
42sub class_label {
43    MT->translate("Job");
44}
45
461;
Note: See TracBrowser for help on using the browser.