Skip to content

fireworq/perl5-TheSchwartz-Fireworq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

TheSchwartz::Fireworq - TheSchwartz interface for Fireworq.

SYNOPSIS

package My::App;
use TheSchwartz::Fireworq;

sub work_asynchronously {
    my $client = TheSchwartz::Fireworq->new(
        server => 'http://localhost:8080',      # Fireworq host
        worker => 'http://localhost:5000/work', # Your app worker endpoint
    );
    $client->insert('My::Worker', { @_ });
}

package My::Worker;
use parent qw(TheSchwartz::Worker);

sub work {
    my ($class, $job) = @_;

    use Data::Dumper;
    warn Dumper $job->arg;
    
    $job->completed;
}

# app.psgi
package main;
use Plack::Builder;

my $app = sub { ... };
builder {
    enable 'TheSchwartz::Fireworq',
        path => '/work';
    $app;
};

AUTHOR

INA Lintaro tarao.gnn@gmail.com

SEE ALSO

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages