$app->minion->add_task( passtest => sub {
my ( $job, $aa, $bb ) = @_;
my $cc = "$aa $bb";
$job->note( cc => "$cc" );
$job->finish("All went well!, $cc");
} );Saisissez le code i my $id2 = $c->minion->enqueue( passtest => [ "bla", "url" ] );
my $job = $c->minion->job("$id2");
say "New Method : " . pp($job->info);
New Method : {
args => ["bla", "url"],
attempts => 1,
children => [],
created => 1571654552.89089,
delayed => 1571654552.89089,
finished => undef,
id => 195520,
notes => {},
parents => [],
priority => 0,
queue => "default",
result => undef,
retried => undef,
retries => 0,
started => undef,
state => "inactive",
task => "passtest",
time => 1571654552.89342,
worker => undef,
}Saisissez le code ici...{
"args" => [
"bla",
"url"
],
"attempts" => 1,
"children" => [],
"created" => "2019-10-21T10:42:32.89089Z",
"delayed" => "2019-10-21T10:42:32.89089Z",
"finished" => "2019-10-21T10:42:32.90722Z",
"id" => 195520,
"notes" => {
"cc" => "bla url"
},
"parents" => [],
"priority" => 0,
"queue" => "default",
"result" => "All went well!, bla url",
"retried" => undef,
"retries" => 0,
"started" => "2019-10-21T10:42:32.89251Z",
"state" => "finished",
"task" => "passtest",
"time" => "2019-10-21T10:45:09.66926Z",
"worker" => 134
}On 22 Oct 2019, at 12:31 am, BobbyBrown <bboby....@gmail.com> wrote:I still have not figured out how to reliably get data out of a minion task, I'll have to work on events and read up on non-blocking.If I understand the code correctly the linkcheck example simply fails if the minion job has not finished when it looks up the result?