davin-bao / mailbox
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/davin-bao/mailbox
Requires
- php: >=5.3.0
- illuminate/support: 4.1.*
- laravelbook/ardent: 2.4.*
This package is auto-updated.
Last update: 2025-09-21 22:12:45 UTC
README
Config Redis
- Go to app/config/database.php, add code:
'redis' => array( 'cluster' => false, 'default' => array( 'host' => '127.0.0.1', 'port' => 6379, 'database' => 0, ), ),
- Go to app/config/cache.php, modify the code:
... 'driver' => 'redis', ...
Multi Queue Config
- Go to app/config/queue.php, add code:
... 'default' => 'low', ... 'connections' => array( ... 'high' => array( 'driver' => 'redis', 'queue' => 'high', ), 'low' => array( 'driver' => 'redis', 'queue' => 'low', ), ),
- Open CMD, and run command:
php artisan queue:listen --queue=low --sleep=0 --timeout=0
- Open CMD, and run command:
php artisan queue:listen --queue=high --sleep=0 --timeout=0
- Add queue:
\Queue::push(function($job) { \Log::info('10This is was written via the MailWorker class at '.time().', id is '.$job->getJobId()); $job->release(10); },array('message' => 'aa'), 'high'); \Queue::push( '\DavinBao\Mailbox\MailWorker@receiveMail', array('message' => 'aa'), 'low');