2
0
forked from Wavyzz/dolibarr

Fix pagination on cron jobs

Fix perf when too much lines
This commit is contained in:
Laurent Destailleur
2015-12-19 02:38:11 +01:00
parent bd91f327b8
commit a973c91c24
6 changed files with 92 additions and 49 deletions

View File

@@ -0,0 +1,23 @@
-- ===================================================================
-- Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_status (status);
ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_datelastrun (datelastrun);
ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_datenextrun (datenextrun);
ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_datestart (datestart);
ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_dateend (dateend);

View File

@@ -44,8 +44,8 @@ CREATE TABLE llx_cronjob
frequency integer NOT NULL DEFAULT 0,
maxrun integer NOT NULL DEFAULT 0, -- set this to 1 for a job queued for on run only
nbrun integer, -- nb of run complete (failed or not)
autodelete integer DEFAULT 0, -- Job can be delete once finished
status integer NOT NULL DEFAULT 1,
autodelete integer DEFAULT 0, -- 1=Job must be deleted once finished, 2=Job must be archived once finished (archive = status 2)
status integer NOT NULL DEFAULT 1, -- 0=disabled, 1=enabled, 2=archived
fk_user_author integer DEFAULT NULL,
fk_user_mod integer DEFAULT NULL,
fk_mailing integer DEFAULT NULL, -- id of emailing if job was queued to send mass emailing