Queue of laraveljob: listen queue Processing

Source: Internet
Author: User
Laravel is locally developed and uploaded to the remote server. {code ...} {code...} is returned ...} after a program is developed locally and uploaded to the server, do you need to upload the source code. env configuration {code ...} queue. php configuration file {code ...} if the leader wants to supervise... laravel is developed locally and uploaded to the remote server,

php artisan queue:listen

Result returned

[PDOException]  could not find driver

After a program is developed locally and uploaded to the server, what else do I need to do besides uploading the source code?

. Env Configuration

CACHE_DRIVER=fileSESSION_DRIVER=fileQUEUE_DRIVER=database

Queue. php configuration file


   env('QUEUE_DRIVER', 'database'),    /*    |--------------------------------------------------------------------------    | Queue Connections    |--------------------------------------------------------------------------    |    | Here you may configure the connection information for each server that    | is used by your application. A default configuration has been added    | for each back-end shipped with Laravel. You are free to add more.    |    */    'connections' => [        'sync' => [            'driver' => 'sync',        ],        'database' => [            'driver' => 'database',            'table' => 'jobs',            'queue' => 'default',            'expire' => 60,        ],        'beanstalkd' => [            'driver' => 'beanstalkd',            'host'   => 'localhost',            'queue'  => 'default',            'ttr'    => 60,        ],        'sqs' => [            'driver' => 'sqs',            'key'    => 'your-public-key',            'secret' => 'your-secret-key',            'queue'  => 'your-queue-url',            'region' => 'us-east-1',        ],        'iron' => [            'driver'  => 'iron',            'host'    => 'mq-aws-us-east-1.iron.io',            'token'   => 'your-token',            'project' => 'your-project-id',            'queue'   => 'your-queue-name',            'encrypt' => true,        ],        'redis' => [            'driver' => 'redis',            'connection' => 'default',            'queue'  => 'default',            'expire' => 60,        ],    ],    /*    |--------------------------------------------------------------------------    | Failed Queue Jobs    |--------------------------------------------------------------------------    |    | These options configure the behavior of failed queue job logging so you    | can control which database and table are used to store the jobs that    | have failed. You may change them to any database / table you wish.    |    */    'failed' => [        'database' => 'mysql', 'table' => 'failed_jobs',    ],];

If the leader wants to listen to the queue, should the command window be open all the time?php artisan queue:listen

If it is disabled, it seems that the queue tasks in the database will not be executed.

How can I keep listening for queue processing?

Reply content:

Laravel is developed locally and uploaded to the remote server,

php artisan queue:listen

Result returned

[PDOException]  could not find driver

After a program is developed locally and uploaded to the server, what else do I need to do besides uploading the source code?

. Env Configuration

CACHE_DRIVER=fileSESSION_DRIVER=fileQUEUE_DRIVER=database

Queue. php configuration file


   env('QUEUE_DRIVER', 'database'),    /*    |--------------------------------------------------------------------------    | Queue Connections    |--------------------------------------------------------------------------    |    | Here you may configure the connection information for each server that    | is used by your application. A default configuration has been added    | for each back-end shipped with Laravel. You are free to add more.    |    */    'connections' => [        'sync' => [            'driver' => 'sync',        ],        'database' => [            'driver' => 'database',            'table' => 'jobs',            'queue' => 'default',            'expire' => 60,        ],        'beanstalkd' => [            'driver' => 'beanstalkd',            'host'   => 'localhost',            'queue'  => 'default',            'ttr'    => 60,        ],        'sqs' => [            'driver' => 'sqs',            'key'    => 'your-public-key',            'secret' => 'your-secret-key',            'queue'  => 'your-queue-url',            'region' => 'us-east-1',        ],        'iron' => [            'driver'  => 'iron',            'host'    => 'mq-aws-us-east-1.iron.io',            'token'   => 'your-token',            'project' => 'your-project-id',            'queue'   => 'your-queue-name',            'encrypt' => true,        ],        'redis' => [            'driver' => 'redis',            'connection' => 'default',            'queue'  => 'default',            'expire' => 60,        ],    ],    /*    |--------------------------------------------------------------------------    | Failed Queue Jobs    |--------------------------------------------------------------------------    |    | These options configure the behavior of failed queue job logging so you    | can control which database and table are used to store the jobs that    | have failed. You may change them to any database / table you wish.    |    */    'failed' => [        'database' => 'mysql', 'table' => 'failed_jobs',    ],];

If the leader wants to listen to the queue, should the command window be open all the time?php artisan queue:listen

If it is disabled, it seems that the queue tasks in the database will not be executed.

How can I keep listening for queue processing?

Use Supervisor to run queue in the background in the production environment
Http://laravel.com/docs/5.1/queues#supervisor-configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.