Commit 6e850bdf authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: have to satisfy foreign key constraints

parent 4ee463e1
......@@ -84,8 +84,6 @@ sub CreateNewJob {
my ($input_id, $analysis, $prev_analysis_job_id, $blocked, $semaphore_count, $semaphored_job_id) =
rearrange([qw(INPUT_ID ANALYSIS INPUT_JOB_ID BLOCK SEMAPHORE_COUNT SEMAPHORED_JOB_ID)], @args);
$prev_analysis_job_id ||=0;
throw("must define input_id") unless($input_id);
throw("must define analysis") unless($analysis);
throw("analysis must be [Bio::EnsEMBL::Analysis] not a [$analysis]")
......
......@@ -386,7 +386,7 @@ sub run {
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor->CreateNewJob(
-input_id => $input_id_hash, # input_ids are now centrally stringified in the AnalysisJobAdaptor
-analysis => $analysis,
-input_job_id => 0, # because these jobs are created by the initialization script, not by another job
-input_job_id => undef, # these jobs are created by the initialization script, not by another job
);
}
}
......
......@@ -228,11 +228,11 @@ CREATE TABLE analysis_ctrl_rule (
CREATE TABLE analysis_job (
analysis_job_id int(10) NOT NULL auto_increment,
prev_analysis_job_id int(10) NOT NULL, #analysis_job which created this from rules
prev_analysis_job_id int(10) DEFAULT NULL, #analysis_job which created this from rules
analysis_id int(10) unsigned NOT NULL,
input_id char(255) not null,
input_id char(255) NOT NULL,
job_claim char(40) NOT NULL DEFAULT '', #UUID
worker_id int(10) unsigned NOT NULL,
worker_id int(10) unsigned DEFAULT NULL,
status enum('READY','BLOCKED','CLAIMED','COMPILATION','GET_INPUT','RUN','WRITE_OUTPUT','DONE','FAILED','PASSED_ON') DEFAULT 'READY' NOT NULL,
retry_count int(10) default 0 not NULL,
completed datetime NOT NULL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment