blob: 6f921d6fa7061686e4e2f6c8c0ee9a0bff3e329b (
plain) (
tree)
|
|
#!/usr/bin/env perl
use strict;
use warnings;
package myworker;
use Moose;
with 'presque::worker';
use YAML::Syck;
sub work {
my ($self, $job) = @_;
warn Dump $job;
sleep(5);
}
package main;
my $w = myworker->new(
base_uri => 'http://localhost:5000',
queue_name => 'foo',
fork_dispatcher => 1,
);
$w->start;
|