TaskRetries: init table
This commit is contained in:
parent
1f2adf61aa
commit
c4134c8e84
110
src/lib/Hydra/Schema/Result/TaskRetries.pm
Normal file
110
src/lib/Hydra/Schema/Result/TaskRetries.pm
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
use utf8;
|
||||||
|
package Hydra::Schema::Result::TaskRetries;
|
||||||
|
|
||||||
|
# Created by DBIx::Class::Schema::Loader
|
||||||
|
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Hydra::Schema::Result::TaskRetries
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use base 'DBIx::Class::Core';
|
||||||
|
|
||||||
|
=head1 COMPONENTS LOADED
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=item * L<Hydra::Component::ToJSON>
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
__PACKAGE__->load_components("+Hydra::Component::ToJSON");
|
||||||
|
|
||||||
|
=head1 TABLE: C<taskretries>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
__PACKAGE__->table("taskretries");
|
||||||
|
|
||||||
|
=head1 ACCESSORS
|
||||||
|
|
||||||
|
=head2 id
|
||||||
|
|
||||||
|
data_type: 'integer'
|
||||||
|
is_auto_increment: 1
|
||||||
|
is_nullable: 0
|
||||||
|
sequence: 'taskretries_id_seq'
|
||||||
|
|
||||||
|
=head2 channel
|
||||||
|
|
||||||
|
data_type: 'text'
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
|
=head2 pluginname
|
||||||
|
|
||||||
|
data_type: 'text'
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
|
=head2 payload
|
||||||
|
|
||||||
|
data_type: 'text'
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
|
=head2 attempts
|
||||||
|
|
||||||
|
data_type: 'integer'
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
|
=head2 retry_at
|
||||||
|
|
||||||
|
data_type: 'integer'
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
__PACKAGE__->add_columns(
|
||||||
|
"id",
|
||||||
|
{
|
||||||
|
data_type => "integer",
|
||||||
|
is_auto_increment => 1,
|
||||||
|
is_nullable => 0,
|
||||||
|
sequence => "taskretries_id_seq",
|
||||||
|
},
|
||||||
|
"channel",
|
||||||
|
{ data_type => "text", is_nullable => 0 },
|
||||||
|
"pluginname",
|
||||||
|
{ data_type => "text", is_nullable => 0 },
|
||||||
|
"payload",
|
||||||
|
{ data_type => "text", is_nullable => 0 },
|
||||||
|
"attempts",
|
||||||
|
{ data_type => "integer", is_nullable => 0 },
|
||||||
|
"retry_at",
|
||||||
|
{ data_type => "integer", is_nullable => 0 },
|
||||||
|
);
|
||||||
|
|
||||||
|
=head1 PRIMARY KEY
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=item * L</id>
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
__PACKAGE__->set_primary_key("id");
|
||||||
|
|
||||||
|
|
||||||
|
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-26 16:30:59
|
||||||
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4MC8UnsgrvJVRrIURvSH5A
|
||||||
|
|
||||||
|
|
||||||
|
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||||
|
1;
|
|
@ -553,6 +553,21 @@ create table StarredJobs (
|
||||||
foreign key (project, jobset) references Jobsets(project, name) on update cascade on delete cascade
|
foreign key (project, jobset) references Jobsets(project, name) on update cascade on delete cascade
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- Events processed by hydra-notify which have failed at least once
|
||||||
|
--
|
||||||
|
-- The payload field contains the original, unparsed payload.
|
||||||
|
--
|
||||||
|
-- One row is created for each plugin which fails to process the event,
|
||||||
|
-- with an increasing retry_at and attempts field.
|
||||||
|
create table TaskRetries (
|
||||||
|
id serial primary key not null,
|
||||||
|
channel text not null,
|
||||||
|
pluginname text not null,
|
||||||
|
payload text not null,
|
||||||
|
attempts integer not null,
|
||||||
|
retry_at integer not null
|
||||||
|
);
|
||||||
|
create index IndexTaskRetriesOrdered on TaskRetries(retry_at asc);
|
||||||
|
|
||||||
-- The output paths that have permanently failed.
|
-- The output paths that have permanently failed.
|
||||||
create table FailedPaths (
|
create table FailedPaths (
|
||||||
|
|
|
@ -39,6 +39,7 @@ make_schema_at("Hydra::Schema", {
|
||||||
"starredjobs" => "StarredJobs",
|
"starredjobs" => "StarredJobs",
|
||||||
"systemstatus" => "SystemStatus",
|
"systemstatus" => "SystemStatus",
|
||||||
"systemtypes" => "SystemTypes",
|
"systemtypes" => "SystemTypes",
|
||||||
|
"taskretries" => "TaskRetries",
|
||||||
"urirevmapper" => "UriRevMapper",
|
"urirevmapper" => "UriRevMapper",
|
||||||
"userroles" => "UserRoles",
|
"userroles" => "UserRoles",
|
||||||
"users" => "Users",
|
"users" => "Users",
|
||||||
|
|
15
src/sql/upgrade-77.sql
Normal file
15
src/sql/upgrade-77.sql
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
-- Events processed by hydra-notify which have failed at least once
|
||||||
|
--
|
||||||
|
-- The payload field contains the original, unparsed payload.
|
||||||
|
--
|
||||||
|
-- One row is created for each plugin which fails to process the event,
|
||||||
|
-- with an increasing retry_at and attempts field.
|
||||||
|
create table TaskRetries (
|
||||||
|
id serial primary key not null,
|
||||||
|
channel text not null,
|
||||||
|
pluginname text not null,
|
||||||
|
payload text not null,
|
||||||
|
attempts integer not null,
|
||||||
|
retry_at integer not null
|
||||||
|
);
|
||||||
|
create index IndexTaskRetriesOrdered on TaskRetries(retry_at asc);
|
Loading…
Reference in a new issue