This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app->minion->add_task(shell => sub { | |
my ($job, $cmds ) = @_; | |
$job->app->log->debug(" ".join ",", @$cmds); | |
my $out; | |
my $fork = Mojo::IOLoop::ReadWriteFork->new; | |
$fork->on(error => sub { | |
my ($fork, $error) = @_; | |
warn $error; | |
$job->fail($error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chart.source(response.data, { | |
slack : { | |
sync: true | |
}, | |
path_group: { | |
sync: true | |
} | |
}); | |
chart.facet('list', { | |
fields: ['path_group'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Mojo::Base -base; | |
use Mojo::Promise; | |
use Mojo::IOLoop; | |
my $isMomHappy = 0; | |
sub willIGetNewPhone { | |
my $promise= Mojo::Promise->new; | |
if ($isMomHappy) { | |
my $phone = { brand => 'Samsung', color => 'black' }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MyApp::Labels; | |
use Mojo::Base 'Mojolicious::Controller'; | |
use Modal::Labels; | |
#/show (Accept: application/xml) | |
#/show.js (Accept: application/javascript) | |
sub show { | |
my $self = shift; | |
$self->stash(labels => Modal::Labels->select); |