GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  QUDO::MANUAL::JA::TUTORIAL (3)

.ds Aq ’

NAME

Qudo::Manual::JA::Tutorial - Qudo’s sample code document lang:ja

CONTENTS

DESCRIPTION

QudoXJobXXXXXXXXXXClientXWorkerXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXX

QudoXXXXXXXXXXXXXXXXXQudoXXXXXXXXXXXXXXXXXXXXX XXXXXXXXRDBMSXXMySQLX,XSQLiteX,XPostgreSQLXXXX

XXXXXsetupXXXXXqudoXXXXXXXXXXXX

client

QudoXJob QueueingXXXXXXXXXXXXXXXXXXXX



    # in your script:
    use Qudo;
    my $client = Qudo->new(
        driver_class => Skinny, # DBIx::Skinny
        databases => [
            +{
                dsn      => dbi:SQLite:/tmp/qudo.db,
                username => ,
                password => ,
            }
        ],
    );

    # enqueue job
    $client->enqueue("Your::Worker::Mail", { arg => $user->email, uniqkey => $user->login_id});



XXQudoXXXXXXXXXXXXXX

JobXQueueingXXXXXXXXXXXXXXXXXXXXXXXXXX

QudoXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXhashrefXXXXXXX

XXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXJobXenqueueXXXX

enqueueXXXXX

XXXXXJobXXXXXXWorkerXpackageX

XXXXXWorkerXXXXXXXX

XXXXXXXJobXXXXXXXXXXXYour::Worker::MailXXXXX

XXXXXXXXXX$user->emailXXXXXXXXXXXXXX

JobXXXXXXXXXX$user->login_idXXXXXIDXXXXXXXXXX

XXXXXXXXhashrefXXXXXXXXXXXXXXXXXXXXXXX

run_after X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

priority X XXXXXXXXXXXXXXXXXXXXjobXXXpriotiryXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXYour::Worker::MailXXXXXXXXXX

worker

queueingXXXJobXXXXXXXworkerXXXXXX



    package Your::Worker::Mail;
    use base Qudo::Worker;
    sub work {
        my ($class, $job) = @_;
        print $job->arg; #print $user->email;
       
        # send mail process...
       
        $job->completed; # finished job!
    }
    1;



Qudo::WokerXXXXXXXXXXXXX

XXXXworkXXXXXXXXXXXXXXXXXXX

workXXXXXXXXXXXJobXXXXXXXXXXXXXX

$job->argXXXXXQueueingXXXXXXXXXWorkerXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXX workerXXXXXXXXXXXXXXXXXXXXXX



    # ex) qudo-worker.pl :
    use Qudo;
    my $worker = Qudo->new(
        driver_class => Skinny,
        databases => [
            +{
                dsn      => dbi:SQLite:/tmp/qudo.db,
                username => ,
                password => ,
            }
        ],
        manager_abilities => [qw/Your::Worker::Mail/], # set worker
    );
    $worker->work(); # boot manager
    # work work work!



clientXXXXXXXXXXXXXXXXXXXXXXXXQudoXXXXXXXXXXXXXX

XXXXmanager_abilitiesXXXXXXXXX

XXworkerXXXXXWorkerXXXXXXXXXX

$worker->work()XXXXXXXXXXXXX

JobXQueueingXXXXXWorkerXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXX

XXXXX:)

workXXXXXXXXXXXXXXXXXJobXQueueingXXXJobXXXXXWorkerXXXXXXXXXXX

    Driver

QudoXXJobXstoreXXXXXXXXXXXXXXXXXX

XXXXXXXDBIx::SkinnyXXXXRDBMSXXXXXDriverXXXXXXX

SkinnyXXXXDBIXXXXXXXXXXX

DriverXHookXPluginXXXXXXXXXXXXXXXXXDBICXXXXXXXCDBIXXXXXXXData::ModelXXXXXXXXXXXXXXXXXXX

XXXXXXXXXX:)

XXXXXXXXXXXXXXXXXXXXX:)

XXXXXXDriverX



    Qudo->new(
        driver_class => Your::Driver,
        databases => [
            +{
                dsn      => dbi:SQLite:/tmp/qudo.db,
                username => ,
                password => ,
            }
        ],
    );



driver_classXXXXXXXXXXXXXXXXX

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 QUDO::MANUAL::JA::TUTORIAL (3) 2010-11-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.