Hi all,
*tl;dr: *
I'm trying to run some small code to understand how Minion works and I
get "Can't use string as an ARRAY ref" errors when I switched from File
to Pg backend. Something wrong with my database configuration? What does
Mojo::Pg expect?
*full question:*
I have a simple minion with one task defined, task1, just prints the args.
In my startup, I run
$self->Scheduler->Minion->enqueue(task1 => [1, 2, 3]);
$self->Scheduler->Minion->perform_jobs;
The output using File backend is the expected:
Task1: [1, 2, 3]
The ouput using Pg backend is not expected:
(in cleanup) DBD::Pg::st DESTROY failed: no connection to server at
[...]/Mojo/Pg.pm line 82, <DATA> line 443.
But then, when I query the database, the result column in the
minion_jobs table shows:
Can't use string "[1, 2, 3]" as an ARRAY ref while "strict refs" in
use at [...]/Minion/Job.pm line 59, <DATA> line 443.
Job.pm, line 59, in sub start, expects $self->args to be an arrayref,
but then I don't know why it's stored and retrieved as a string...
$self->fail($@) unless eval { $self->$cb(@{$self->args}); 1 };
Any help?
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.