7263: crunch-job checks for refreshes every two seconds.
authorBrett Smith <brett@norfair>
Wed, 30 Sep 2015 13:10:27 +0000 (09:10 -0400)
committerBrett Smith <brett@norfair>
Wed, 30 Sep 2015 13:10:47 +0000 (09:10 -0400)
This avoids the possibility that a constant stream of data from tasks
can prevent the job from being canceled.  Refs #7263.

sdk/cli/bin/crunch-job

index 423f4cc043409b0f63f96c6c84333b746e21d19a..5539012c49e19e2b9afbeba26850aabbec9405d1 100755 (executable)
@@ -980,7 +980,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
     my $gotsome
        = readfrompipes ()
        + reapchildren ();
-    if (!$gotsome)
+    if (!$gotsome || ($latest_refresh + 2 < scalar time))
     {
       check_refresh_wanted();
       check_squeue();