-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi,
I got error below when load test application. Can assists me on this
DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/site_perl/5.26.1/Minion/Backend/mysql.pm line 590.
Im using mojo full app with below code sample.
Register minion plugin using cache db connection
$app->plugin( Minion => { mysql => $app->dbhWorker } );
Register worker
$app->plugin('Worker::Task::Job');
package Worker::Task::Job;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON qw( encode_json decode_json );
sub register
{
my($self,$app) = @_;
$app->log->info("Registering Worker plugin");
Register worker task
$app->minion->add_task(store_chat => sub {
my($job,$json) = @_;
my $sub = "store_chat";
$job->app->log->info("($sub) storing chat: [$json]");
$job->finish;
$job->remove;
});
}
Metadata
Metadata
Assignees
Labels
No labels