Commit da413295 authored by Jessica Severin's avatar Jessica Severin
Browse files

improved dynamic synch logic. Only case where the 5 minute delay is needed

is when there are lots of workers 'WORKING' so as to avoid them falling over
each other.  The 'WORKING' state only exists in the middle of a large run.
When the last worker dies, the state is 'ALL_CLAIMED' so the sync on death
will happen properly.  As the last pile of workers die they will all do
a synch, but that's OK since the system needs to be properly synched when
the last one dies since there won't be anybody left to do it.
Also added 10 minute check for if already 'SYNCHING' to deal with case if
worker dies in the middle of 'SYNCHING'.
parent fe71fc76
......@@ -255,9 +255,12 @@ sub synchronize_AnalysisStats {
return $analysisStats unless($analysisStats);
return $analysisStats unless($analysisStats->analysis_id);
return $analysisStats if($analysisStats->seconds_since_last_update < 5*60);
return $analysisStats if(($analysisStats->status eq 'WORKING') and
($analysisStats->seconds_since_last_update < 5*60));
return $analysisStats if($analysisStats->status eq 'SYNCHING');
return $analysisStats if(($analysisStats->status eq 'SYNCHING') and
($analysisStats->seconds_since_last_update < 10*60));
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