summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-06-24 11:11:38 +0200
committerfranck cuny <franck@lumberjaph.net>2010-06-24 11:11:38 +0200
commitf8cef6ccb5a6b614cb35e8b78b1bbffe44518ec3 (patch)
tree624c704e0f4f409d7f4f171becb932d788757d17 /lib
parentsmall fix (diff)
downloadnet-presque-f8cef6ccb5a6b614cb35e8b78b1bbffe44518ec3.tar.gz
add method to insert job in batch
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/Presque.pm27
1 files changed, 22 insertions, 5 deletions
diff --git a/lib/Net/Presque.pm b/lib/Net/Presque.pm
index 390eb9e..9f72b20 100644
--- a/lib/Net/Presque.pm
+++ b/lib/Net/Presque.pm
@@ -14,14 +14,31 @@ net_api_method fetch_job => (
     required => [qw/queue_name/],
 );
 
-net_api_method create_job => (
-    method   => 'POST',
-    strict   => 0,
-    path     => '/q/:queue_name',
-    params   => [qw/queue_name/],
+net_api_method fetch_jobs => (
+    method   => 'GET',
+    path     => '/qb/:queue_name',
+    params   => [qw/queue_name worker_id batch_size/],
     required => [qw/queue_name/],
 );
 
+net_api_method create_job => (
+    method        => 'POST',
+    strict        => 0,
+    path          => '/q/:queue_name',
+    params_in_url => [qw/delayed uniq/],
+    params        => [qw/queue_name/],
+    required      => [qw/queue_name/],
+);
+
+net_api_method create_jobs => (
+    method        => 'POST',
+    strict        => 0,
+    path          => '/qb/:queue_name',
+    params_in_url => [qw/delayed/],
+    params        => [qw/queue_name jobs/],
+    required      => [qw/queue_name jobs/],
+);
+
 net_api_method reset_queue => (
     method   => 'DELETE',
     path     => '/q/:queue_name',