rename failures column to be deferrals
This commit is contained in:
@@ -13,7 +13,7 @@ __PACKAGE__->add_columns(
|
|||||||
{ data_type => "inet", is_nullable => 0 },
|
{ data_type => "inet", is_nullable => 0 },
|
||||||
"action",
|
"action",
|
||||||
{ data_type => "text", is_nullable => 0 },
|
{ data_type => "text", is_nullable => 0 },
|
||||||
"failures",
|
"deferrals",
|
||||||
{ data_type => "integer", is_nullable => 1, default_value => '0' },
|
{ data_type => "integer", is_nullable => 1, default_value => '0' },
|
||||||
"skipover",
|
"skipover",
|
||||||
{ data_type => "boolean", is_nullable => 1, default_value => \'false' },
|
{ data_type => "boolean", is_nullable => 1, default_value => \'false' },
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ sub _getsome {
|
|||||||
status => 'queued',
|
status => 'queued',
|
||||||
device => { '-not_in' => $jobs->correlate('skipped')->search({
|
device => { '-not_in' => $jobs->correlate('skipped')->search({
|
||||||
backend => $fqdn,
|
backend => $fqdn,
|
||||||
-or => [{ failures => { '>=', 10 } },{ '-bool' => 'skipover' }],
|
-or => [{ deferrals => { '>=', 10 } },{ '-bool' => 'skipover' }],
|
||||||
}, { columns => 'device' })->as_query },
|
}, { columns => 'device' })->as_query },
|
||||||
%$where,
|
%$where,
|
||||||
}, { order_by => 'random()', rows => $num_slots });
|
}, { order_by => 'random()', rows => $num_slots });
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ CREATE TABLE "device_skip" (
|
|||||||
"backend" text NOT NULL,
|
"backend" text NOT NULL,
|
||||||
"device" inet NOT NULL,
|
"device" inet NOT NULL,
|
||||||
"action" text NOT NULL,
|
"action" text NOT NULL,
|
||||||
"failures" integer DEFAULT 0,
|
"deferrals" integer DEFAULT 0,
|
||||||
"skipover" boolean DEFAULT false,
|
"skipover" boolean DEFAULT false,
|
||||||
PRIMARY KEY ("backend", "device", "action")
|
PRIMARY KEY ("backend", "device", "action")
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user