队列允许你将一个耗时的任务进行延迟处理.

首先要在.evn文件中配置

QUEUE_DRIVER=database

要使用 database 这个队列驱动的话,则需要创建一个数据表来记住任务,使用命令:
php artisan queue:table
php artisan migrate
然后用tinker生成测试数据->使用命令make:job生成相对应的job文件
例如 make:job SendEmail(job文件名) 生成一个发生邮件的队列,这个文件存在于app/Jobs/下面
生成一个控制器,使用其中的dispatch()方法将job放入laravel的queue队列当中

在routes.php文件中设置路径,运行,在数据库中的job表中会生成队列数据,

然后运行命令 queue:work 就会执行一个任务 ,即jobs表变成

运行命令queue:listen 则剩下的任务将全部干掉

												

队列中使用Database Driver的更多相关文章

  1. 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE

    问题 如下: 2017-07-16 08:50:57.436  INFO 13524 --- [           main] c.p.p.web.PointshopWebApplication   ...

  2. 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE(转)

    问题 如下: 2017-07-16 08:50:57.436  INFO 13524 --- [           main] c.p.p.web.PointshopWebApplication   ...

  3. Cannot determine embedded database driver class for database type NONE

    springboot+jpa使用自定义配置文件连接数据库报错:Cannot determine embedded database driver class for database type NON ...

  4. Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embe

    Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationEx ...

  5. Springboot项目启动报错,提示Cannot determine embedded database driver class for database type NONE

    我在springboot项目里面引入了数据库的配置: <dependency> <groupId>org.mybatis.spring.boot</groupId> ...

  6. spriing boot 启动报错:Cannot determine embedded database driver class for database type NONE

    最近在学习使用spring boot.使用maven创建好工程,只引用需要用到的spring boot相关的jar包,除此之外没有任何的配置. 写了一个最简单的例子,如下所示: package com ...

  7. 在myeclipse中配置DB Driver(数据库用MySql),并在myeclipse执行sql语句操作

    在myeclipse中配置DB Driver(数据库用MySql),并在myeclipse执行sql语句操作 MyEclipse6.5    ,  mysq驱动jar包为mysql-connector ...

  8. SpringBoot项目报错Cannot determine embedded database driver class for database type NONE

    原因: Cannot determine embedded database driver class for database type NONE 这是因为spring boot默认会加载org.s ...

  9. springboot启动报错:Cannot determine embedded database driver class for database type NONE.

    package cn.zb.test; import org.springframework.boot.SpringApplication; import org.springframework.bo ...

随机推荐

  1. Python 2.7.9 Demo - ini文件的读、写

    ini文件 [weixin_info] hello = Nick Huang #coding=utf-8 #!/usr/bin/python import ConfigParser; cp = Con ...

  2. Create Hierarchical Tree To Control Records In Oracle Forms

    Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to co ...

  3. Spring MVC 流程图

    Spring MVC 流程图 分类: Spring2014-02-23 19:49 9106人阅读 评论(2) 收藏 举报 spring mvc Spring MVC工作流程图   图一   图二  ...

  4. servlet&jsp高级:第二部分

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  5. codevs 1294 全排列 next_permuntation

    #include<bits/stdc++.h> using namespace std; #define ll long long #define pi (4*atan(1.0)) #de ...

  6. hdu 5137 How Many Maos Does the Guanxi Worth 最短路 spfa

    How Many Maos Does the Guanxi Worth Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 512000/5 ...

  7. AS3 求两条直线的交点

    //粘贴到帧上运行即可 var p1Start:Point = new Point(0,0); var p1End:Point = new Point(50,50); var p2Start:Poin ...

  8. php 怎么设置报错级别 和 控制报错[转]

    在Windows环境下:有时在其他环境下运行正常的程序在自己的环境上会报错误    程序会 报出  Undefined index:   这样的错误例如有如下的代码:                  ...

  9. 转 谈谈android反编译和防止反编译的方法

    谈谈android反编译和防止反编译的方法   android基于java的,而java反编译工具很强悍,所以对正常apk应用程序基本上可以做到100%反编译还原. 因此开发人员如果不准备开源自己的项 ...

  10. LTE Module User Documentation(翻译6)——物理误差模型、MIMO模型、天线模型

    LTE用户文档 (如有不当的地方,欢迎指正!) 9 PHY Error Model   物理误差模型包含数据误差模型和下行控制误差模型,两者默认为激活.可以使用 ns-3 属性系统去激活,具体为:   ...