diff options
Diffstat (limited to 'eg')
| -rw-r--r-- | eg/simple.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/eg/simple.pl b/eg/simple.pl new file mode 100644 index 0000000..ab07c51 --- /dev/null +++ b/eg/simple.pl @@ -0,0 +1,24 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +package myworker; +use Moose; +with 'presque::worker'; + +use YAML::Syck; +sub work { + my ($self, $job) = @_; + warn ">>>je suis $$\n"; + warn Dump $job; + sleep(100); +} + +package main; +my $w = myworker->new( + base_uri => 'http://localhost:5000', + queue_name => 'foo', + fork_dispatcher => 1, +); + +$w->start; |
