File Coverage

blib/lib/Resque/Plugin/Delay.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Resque::Plugin::Delay;
2 1     1   664 use 5.008001;
  1         6  
3 1     1   6 use strict;
  1         1  
  1         18  
4 1     1   5 use warnings;
  1         8  
  1         40  
5              
6             our $VERSION = "0.03";
7              
8 1     1   380 use Resque::Plugin;
  1         458053  
  1         5  
9              
10             add_to resque => 'Delay::Dequeue';
11             add_to job => 'Delay::Job';
12              
13              
14             1;
15             __END__
16              
17             =encoding utf-8
18              
19             =for html <a href="https://travis-ci.org/meru-akimbo/resque-delay-perl"><img src="https://travis-ci.org/meru-akimbo/resque-delay-perl.svg?branch=master"></a>
20              
21             =head1 NAME
22              
23             Resque::Plugin::Delay - Delay the execution of job
24              
25             =head1 SYNOPSIS
26              
27             use Resque;
28              
29             my $start_time = time + 100;
30              
31             my $resque = Resque->new(redis => $redis_server, plugins => ['Delay']);
32             $resque->push('test-job' => +{
33             class => 'Hoge',
34             args => [+{ cat => 'nyaaaa' }, +{ dog => 'bow' }],
35             start_time => $start_time,
36             }
37             );
38              
39             =head1 DESCRIPTION
40              
41             Passing epoch to the start_time attribute of payload makes it impossible to execute work until that time.
42              
43             =head1 LICENSE
44              
45             Copyright (C) meru_akimbo.
46              
47             This library is free software; you can redistribute it and/or modify
48             it under the same terms as Perl itself.
49              
50             =head1 AUTHOR
51              
52             meru_akimbo E<lt>merukatoruayu0@gmail.comE<gt>
53              
54             =cut
55