close the OUTFILE handle collab/phasefx/action_trigger_aggregator
authorJason Etheridge <jason@esilibrary.com>
Tue, 10 May 2016 15:38:05 +0000 (11:38 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 10 May 2016 15:38:05 +0000 (11:38 -0400)
in action_trigger_aggregator.pl

Otherwise you may try to read from the file when its contents haven't yet been
flushed to disk, ultimately resulting in truncated files on the remote system.

Thanks to Steve for troubleshooting!

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/support-scripts/action_trigger_aggregator.pl

index 9da5f6f..a126db0 100755 (executable)
@@ -194,6 +194,7 @@ while (my $resp = $req->recv(timeout => 3600)) {
     my $content = $resp->content or next;
     print OUTFILE $content->{data};
 }
+close OUTFILE;
 
 if ($remote_acct) {
     # send the file to the remote account