Changeset 27425 for gs2-extensions/tdb-edit
- Timestamp:
- 2013-05-24T09:40:52+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/tdb-edit/trunk/src/perllib/dbutil/tdbserver.pm
r27399 r27425 69 69 my $we_started_server = 0; 70 70 my $server_lockfile_path = &util::filename_cat($ENV{'GSDLHOME'},'collect',$collection,'tmp','tdbserver.lock'); 71 print " * Searching for TDBServer lockfile...\n" ;71 print " * Searching for TDBServer lockfile...\n" if ($debug); 72 72 if (!-e $server_lockfile_path) 73 73 { 74 print "Not found.\n" ;74 print "Not found.\n" if ($debug); 75 75 # We need to lock here to ensure only one thread enters the following code, 76 76 # sees a missing TDBServer, and launches it … … 85 85 # ...start it! 86 86 my $launch_cmd = 'TDBServer.pl "' . $$ . '" "' . $collection . '"'; 87 print "* Starting TDBServer for: " . $collection . " [" . $launch_cmd . "]... 87 print "* Starting TDBServer for: " . $collection . " [" . $launch_cmd . "]...\n"; 88 88 # @note I once had the below pipe ending with 2>&1 |, but that then blocks 89 89 # indefinitely when looping and reading <SERVERIN>. … … 125 125 die("Error! TDBServer failed to create lock file. Check server logs."); 126 126 } 127 els e128 { 129 print " Running on " . $server_host . ":" . $server_port . "\n";127 elsif ($debug) 128 { 129 print "* Server now running on " . $server_host . ":" . $server_port . "\n"; 130 130 } 131 131 # record this for later … … 138 138 else 139 139 { 140 print "Found!\n" ;140 print "Found!\n" if ($debug); 141 141 } 142 142 # record this for later … … 179 179 # While the file exists, we should wait 180 180 autoflush STDOUT 1; 181 print "* Waiting for TDBServer to exit [" . $server_lockfile_path . "]"; 181 my $blurb = ''; 182 if ($debug) 183 { 184 $blurb = '[' . $server_lockfile_path . ']'; 185 } 186 print '* Waiting for TDBServer to exit'; 182 187 if (-e $server_lockfile_path) 183 188 { 184 189 while (-e $server_lockfile_path) 185 190 { 186 print ".";191 print '.'; 187 192 sleep(1); 188 193 } … … 191 196 else 192 197 { 193 print "* NOT Waiting for TDBServer to exit... ";198 print '* NOT Waiting for TDBServer to exit... '; 194 199 } 195 200 print " Done!\n";
Note:
See TracChangeset
for help on using the changeset viewer.