Figured out what was the issue.
When you have workers running, any new task is automatically performed.

So it's enough to add task like $self->minion->enqueue('some_task') and run 
at least one worker (in my case I run separate docker container).
After that any new task will started automatically.


понедельник, 30 апреля 2018 г., 14:49:32 UTC+3 пользователь Pavel Serikov 
написал:
>
> Hi there,
>
> I wrote demo app, https://github.com/pavelsr/minion_ws_demo
> App must notify user through websocket when minion job is finished.
>
> But it doesn't work as expected.
>
> Could someone help to figure out what is wrong? You can write a review 
> directly in commit 
> <https://github.com/pavelsr/minion_ws_demo/commit/cf0b5db2108b980ae3aa2b89fc12f075ea6f8ae5#diff-5bff693a803572bca10b2c7357fa7d6eR29>
>  
> for convenience.
>
> In general, there are two corresponding problems:
>
> 1) Web socket doesn't react on 
> $self->on(task_finished => sub {  
> but I see in debug log last message of task code: 
> $job->app->log->debug('Test minion task '.$job->task.'(id='.$job->id.') 
> finished');
>
> 2) Minion Admin UI 
> <https://metacpan.org/pod/Mojolicious::Plugin::Minion::Admin> shows that 
> task is unactive, but according debug log all task code was executed (I see 
> output from last task code string).
>
>

-- 
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 mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to