Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix descriptions and tests
  • Loading branch information
kraih committed Dec 8, 2017
1 parent d58ae7d commit 4bb27ca
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/Minion.pm
Expand Up @@ -625,7 +625,7 @@ Reset job queue.
my $stats = $minion->stats;
Get statistics for jobs and workers.
Get statistics for the job queue.
# Check idle workers
my $idle = $minion->stats->{inactive_workers};
Expand Down
18 changes: 11 additions & 7 deletions lib/Minion/Backend.pm
Expand Up @@ -92,7 +92,8 @@ following new ones.
my $bool = $backend->broadcast('some_command', [@args]);
my $bool = $backend->broadcast('some_command', [@args], [$id1, $id2, $id3]);
Broadcast remote control command to one or more workers.
Broadcast remote control command to one or more workers. Meant to be overloaded
in a subclass.
=head2 dequeue
Expand Down Expand Up @@ -382,7 +383,8 @@ Id of worker that is processing the job.
my $results = $backend->list_locks($offset, $limit);
Returns information about locks in batches.
Returns information about locks in batches. Meant to be overloaded in a
subclass.
These fields are currently available:
Expand Down Expand Up @@ -475,7 +477,8 @@ Hash reference with whatever status information the worker would like to share.
Try to acquire a named lock that will expire automatically after the given
amount of time in seconds. An expiration time of C<0> can be used to check if a
named lock already exists without creating one.
named lock already exists without creating one. Meant to be overloaded in a
subclass.
These options are currently available:
Expand All @@ -494,13 +497,14 @@ defaults to C<1>.
$backend->note($job_id, foo => 'bar');
Change a metadata field for a job.
Change a metadata field for a job. Meant to be overloaded in a subclass.
=head2 receive
my $commands = $backend->receive($worker_id);
Receive remote control commands for worker.
Receive remote control commands for worker. Meant to be overloaded in a
subclass.
=head2 register_worker
Expand Down Expand Up @@ -586,7 +590,7 @@ Queue to put job in.
my $stats = $backend->stats;
Get statistics for jobs and workers. Meant to be overloaded in a subclass.
Get statistics for the job queue. Meant to be overloaded in a subclass.
These fields are currently available:
Expand Down Expand Up @@ -654,7 +658,7 @@ Uptime in seconds.
my $bool = $backend->unlock('foo');
Release a named lock.
Release a named lock. Meant to be overloaded in a subclass.
=head2 unregister_worker
Expand Down
2 changes: 1 addition & 1 deletion lib/Minion/Backend/Pg.pm
Expand Up @@ -825,7 +825,7 @@ Queue to put job in.
my $stats = $backend->stats;
Get statistics for jobs and workers.
Get statistics for the job queue.
These fields are currently available:
Expand Down
2 changes: 2 additions & 0 deletions t/backend.t
Expand Up @@ -16,6 +16,8 @@ eval { Minion::Backend->finish_job };
like $@, qr/Method "finish_job" not implemented by subclass/, 'right error';
eval { Minion::Backend->list_jobs };
like $@, qr/Method "list_jobs" not implemented by subclass/, 'right error';
eval { Minion::Backend->list_locks };
like $@, qr/Method "list_locks" not implemented by subclass/, 'right error';
eval { Minion::Backend->list_workers };
like $@, qr/Method "list_workers" not implemented by subclass/, 'right error';
eval { Minion::Backend->lock };
Expand Down

0 comments on commit 4bb27ca

Please sign in to comment.