Queue::Q::ReliableFIFO::Item - An item object of an queue item
use Queue::Q::ReliableFIFO::Item; my $item = Queue::Q::ReliableFIFO::Item->new(data => { id => 23 }); my $time_created = $item->time_created; # epoch time # items can be created from serialized data (to be used by # Queue::Q::ReliableFIFO::Redis). my $item = Queue::Q::ReliableFIFO::Item->new(_serialized => $serialized); my $data = $item->data(); my $last_error = $item->last_error();
Constructor for an item object (key "data" for plain data that needs to be serialized, key "_serialized" for data that needs to be deserialzed).
Returns the data where the item was created from.
Returns de time (epoch) the item was originally created (put in the queue).
Returns de time (epoch) the item was put in the queue for the last time.
Returns the number the item was requeued. Requeuing can happen when processing the item fails.
Returns the number the item was requeued. An item fails after the it has been retried up to requeue_limit times (See Redis.pm).
Returns the last error message of processing this item.
Increases the requeue counter of this item.
To install Queue::Q, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Queue::Q
CPAN shell
perl -MCPAN -e shell install Queue::Q
For more information on module installation, please visit the detailed CPAN module installation guide.