Revert "Remove now-unused SystemTypes table"
This reverts commit 71d020735b
.
Unfortunately there are still some cases where we need to set Hydra's
concurrency separately. (Ideally, Hydra would start *all* queued
builds in parallel and let Nix take care of everything...)
This commit is contained in:
parent
5b6b9d37f0
commit
fcd511c4de
|
@ -6,6 +6,10 @@
|
|||
|
||||
$ DBIC_TRACE=1 ./script/hydra_server.pl
|
||||
|
||||
* Setting the maximum number of concurrent builds per system type:
|
||||
|
||||
$ sqlite3 hydra.sqlite "insert into SystemTypes(system, maxConcurrent) values('i686-linux', 3);"
|
||||
|
||||
* Creating a user:
|
||||
|
||||
$ sqlite3 hydra.sqlite "insert into Users(userName, emailAddress, password) values('root', 'e.dolstra@tudelft.nl', '$(echo -n foobar | sha1sum | cut -c1-40)');"
|
||||
|
|
62
src/lib/Hydra/Schema/SystemTypes.pm
Normal file
62
src/lib/Hydra/Schema/SystemTypes.pm
Normal file
|
@ -0,0 +1,62 @@
|
|||
use utf8;
|
||||
package Hydra::Schema::SystemTypes;
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader
|
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Hydra::Schema::SystemTypes
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
|
||||
=head1 TABLE: C<SystemTypes>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->table("SystemTypes");
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 system
|
||||
|
||||
data_type: 'text'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 maxconcurrent
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 2
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"system",
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"maxconcurrent",
|
||||
{ data_type => "integer", default_value => 2, is_nullable => 0 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</system>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->set_primary_key("system");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zg8db3Cbi0QOv+gLJqH8cQ
|
||||
|
||||
1;
|
|
@ -341,6 +341,12 @@ create table CachedCVSInputs (
|
|||
);
|
||||
|
||||
|
||||
create table SystemTypes (
|
||||
system text primary key not null,
|
||||
maxConcurrent integer not null default 2
|
||||
);
|
||||
|
||||
|
||||
-- Views are a mechanism to automatically group related builds
|
||||
-- together. A view definition consists of a build of some "primary"
|
||||
-- job, plus all builds of the other jobs named in ViewJobs that have
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
drop table SystemTypes;
|
|
@ -7,7 +7,7 @@ my $db = Hydra::Model::DB->new;
|
|||
my @sources = $db->schema->sources;
|
||||
my $nrtables = scalar(@sources);
|
||||
|
||||
use Test::Simple tests => 42;
|
||||
use Test::Simple tests => 43;
|
||||
|
||||
foreach my $source (@sources) {
|
||||
my $title = "Basic select query for $source";
|
||||
|
|
Loading…
Reference in a new issue