Changeset 96
- Timestamp:
- Jan 26, 2013, 10:58:11 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oarutils/oar-dispatch
r95 r96 10 10 use Coro::Signal; 11 11 use Coro::Semaphore; 12 use Coro:: Timer qw(sleep);12 use Coro::AnyEvent; 13 13 use Coro::Handle; 14 14 use IO::File; … … 206 206 } 207 207 cede; 208 208 209 209 # asynchrone guard for job end 210 210 async { 211 my $ job_id = shift;211 my $timer; 212 212 GUARD: 213 213 while () { 214 sleep 15; # async, do not re-launch oarstat to fast 214 cede; 215 $timer = AE::now + 5; 216 while ( AE::now < $timer ) { AE::now_update; cede; } 215 217 my $is_finish = `oarstat -s -j $job_id`; 216 218 chomp $is_finish; … … 231 233 $job_todo->down; 232 234 delete $scheduled{$job_id}; 233 } $job_id;235 } 234 236 } 235 237 };
Note: See TracChangeset
for help on using the changeset viewer.