Allow a per-jobset check interval

This allows checking a jobset (say) at most once a day.  It's also
possible to disable polling by setting the interval to 0.  This is
useful for jobsets that use push notification or are manually
evaluated.
This commit is contained in:
Eelco Dolstra
2013-05-02 17:51:38 +02:00
parent edaeb892e7
commit e96916533f
8 changed files with 33 additions and 7 deletions

View File

@ -206,7 +206,8 @@ sub updateJobset {
, enableemail => defined $c->request->params->{enableemail} ? 1 : 0
, emailoverride => trim($c->request->params->{emailoverride}) || ""
, hidden => defined $c->request->params->{visible} ? 0 : 1
, keepnr => trim($c->request->params->{keepnr}) || 3
, keepnr => int(trim($c->request->params->{keepnr})) || 3
, checkinterval => int(trim($c->request->params->{checkinterval}))
, triggertime => $jobset->triggertime // time()
});

View File

@ -100,6 +100,12 @@ __PACKAGE__->table("Jobsets");
default_value: 3
is_nullable: 0
=head2 checkinterval
data_type: 'integer'
default_value: 300
is_nullable: 0
=cut
__PACKAGE__->add_columns(
@ -131,6 +137,8 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 0 },
"keepnr",
{ data_type => "integer", default_value => 3, is_nullable => 0 },
"checkinterval",
{ data_type => "integer", default_value => 300, is_nullable => 0 },
);
=head1 PRIMARY KEY
@ -252,7 +260,7 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-02-25 19:10:12
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SvBgR0iH9NjVH4jvBATYPA
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-05-02 14:50:55
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q4amPCWRoWMThnRa/n/y1w
1;