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

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

Updated indexes for mt_ts_job to use concatenated keys.

  • 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        funccoal => {
28            columns => [ 'funcid', 'coalesce' ],
29        },
30        funcrun => {
31            columns => [ 'funcid', 'run_after' ],
32        },
33        funcpri => {
34            columns => [ 'funcid', 'priority' ],
35        },
36        uniqfunc => {
37            columns => [ 'funcid', 'uniqkey' ],
38            unique => 1,
39        },
40    },
41});
42
43sub class_label {
44    MT->translate("Job");
45}
46
471;
Note: See TracBrowser for help on using the browser.