]>
iEval git - gruntmaster-data.git/blob - lib/Gruntmaster/Data/Result/Job.pm
2 package Gruntmaster
:: Data
:: Result
:: Job
;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Gruntmaster::Data::Result::Job - List of jobs
16 use base
'DBIx::Class::Core' ;
22 __PACKAGE__
-> table ( "jobs" );
31 sequence: 'jobs_id_seq'
44 hostname:PID of daemon that last executed this job. NULL if never executed
51 Unix time when job was submitted
65 File extension of submitted program, without a leading dot
72 Format (programming language) of submitted program
91 If not null, this is a reference solution that should get this result. For example, set reference=0 on jobs that should be accepted, reference=3 on jobs that should get TLE, etc
98 Job result (integer constant from Gruntmaster::Daemon::Constants)
105 Job result (human-readable text)
112 Per-test results (JSON array of hashes with keys id (test number, counting from 1), result (integer constant from Gruntmaster::Daemon::Constants), result_text (human-readable text), time (execution time in decimal seconds))
127 __PACKAGE__
-> add_columns (
130 data_type
=> "integer" ,
131 is_auto_increment
=> 1 ,
133 sequence
=> "jobs_id_seq" ,
136 { data_type
=> "text" , is_foreign_key
=> 1 , is_nullable
=> 1 },
138 { data_type
=> "text" , is_nullable
=> 1 },
140 { data_type
=> "bigint" , is_nullable
=> 0 },
142 { data_type
=> "text" , is_nullable
=> 1 },
144 { data_type
=> "text" , is_nullable
=> 0 },
146 { data_type
=> "text" , is_nullable
=> 0 },
148 { data_type
=> "boolean" , default_value
=> \" false
", is_nullable => 0 },
150 { data_type => " text
", is_foreign_key => 1, is_nullable => 0 },
152 { data_type => " integer
", is_nullable => 1 },
154 { data_type => " integer
", is_nullable => 1 },
156 { data_type => " text
", is_nullable => 1 },
158 { data_type => " text
", is_nullable => 1 },
160 { data_type => " text
", is_nullable => 0 },
162 { data_type => " text
", is_foreign_key => 1, is_nullable => 0 },
175 __PACKAGE__->set_primary_key(" id
");
183 Related object: L<Gruntmaster::Data::Result::Contest>
187 __PACKAGE__->belongs_to(
189 " Gruntmaster
:: Data
:: Result
:: Contest
",
194 on_delete => " CASCADE
",
195 on_update => " NO ACTION
",
203 Related object: L<Gruntmaster::Data::Result::User>
207 __PACKAGE__->belongs_to(
209 " Gruntmaster
:: Data
:: Result
:: User
",
211 { is_deferrable => 0, on_delete => " CASCADE
", on_update => " NO ACTION
" },
218 Related object: L<Gruntmaster::Data::Result::Problem>
222 __PACKAGE__->belongs_to(
224 " Gruntmaster
:: Data
:: Result
:: Problem
",
226 { is_deferrable => 0, on_delete => " CASCADE
", on_update => " NO ACTION
" },
229 =head2 problem_statuses
233 Related object: L<Gruntmaster::Data::Result::ProblemStatus>
237 __PACKAGE__->has_many(
239 " Gruntmaster
:: Data
:: Result
:: ProblemStatus
",
240 { " foreign
. job
" => " self
. id
" },
241 { cascade_copy => 0, cascade_delete => 0 },
245 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-03-16 15:40:48
246 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aaVaCgk198pT0kBGMefkkA
248 use Class::Method::Modifiers qw/after/;
250 sub rawcontest { shift->get_column('contest') }
251 sub rawowner { shift->get_column('owner') }
252 sub rawproblem { shift->get_column('problem') }
255 shift->update({daemon => undef, result => -2, result_text => undef});
258 after qw/insert update delete/ => sub {
260 Gruntmaster::Data::purge '/us/';
261 Gruntmaster::Data::purge '/us/' . $self ->rawowner;
262 Gruntmaster::Data::purge '/st/' . $self ->rawcontest if $self ->rawcontest;
263 Gruntmaster::Data::purge '/log/';
264 Gruntmaster::Data::purge '/log/' . $self ->id;
279 Marius Gavrilescu E<lt>marius @ieval .roE<gt>
281 =head1 COPYRIGHT AND LICENSE
283 Copyright (C) 2014 by Marius Gavrilescu
285 This library is free software; you can redistribute it and/or modify
286 it under the same terms as Perl itself, either Perl version 5.18.1 or,
287 at your option, any later version of Perl 5 you may have available.
This page took 0.063228 seconds and 4 git commands to generate.