Dyrcona

Multisession Fine Generator

Aug 28th, 2019
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Assuming @ids contains a list of circulation ids. Will the below actually work?
  2. # It doesn't seem to when I try it.
  3.  
  4. # Run the fine generator on the new circulations in parallel.
  5. my $multi = OpenSRF::MultiSession->new(
  6.     app => 'open-ils.storage',
  7.     cap => 4,
  8.     api_level => 1
  9. );
  10. foreach (@ids) {
  11.     $multi->request('open-ils.storage.action.circulation.overdue.generate_fines', $_);
  12. }
  13. $multi->session_wait(1);
  14. $multi->disconnect();
Add Comment
Please, Sign In to add comment