Guest User

Untitled

a guest
Apr 26th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. use Qudo;
  7. use MyApp::Worker::Santa;
  8. my $qudo = Qudo->new(
  9. driver_class => 'Skinny',
  10. databases => [+{
  11. dsn => 'dbi:mysql:qudo',
  12. username => 'root',
  13. password => '',
  14. }],
  15. );
  16.  
  17. my @children = (
  18. {
  19. name => 'masartz',
  20. present => 'cake',
  21. },
  22. {
  23. name => 'nekokak',
  24. present => 'chocolate',
  25. },
  26. );
  27.  
  28. $qudo->manager->global_register_hooks(qw/Qudo::Hook::Serialize::JSON/);
  29.  
  30. for my $child ( @children ){
  31. $qudo->enqueue("MyApp::Worker::Santa", { arg => $child });
  32. }
Add Comment
Please, Sign In to add comment