Something went wrong. Try again.
Perl game server for TLE Community
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031package Lacuna::Queue::Job;
use Moose;use YAML;
has 'job' => ( is => 'ro', isa => 'Beanstalk::Job', required => 1, handles => [qw(id buried reserved data error stats delete touch peek release bury args tube ttr priority)],);
sub payload { my ($self) = @_;
my $args = $self->job->args;
if (defined $args && $args->{parent_table}) { my $class = $args->{parent_table}; my $id = $args->{parent_id}; my $thing = Lacuna->db->resultset($class)->find($id); return $thing; } return {};}
__PACKAGE__->meta->make_immutable;1;