https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
| <!-- 1像素透明 --> | |
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> | |
| <!-- 1像素黑色 --> | |
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="> | |
| <a href="http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html">参考网址</a> |
https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
| <?php | |
| /* | |
| Plugin Name: Custom List Table With Database Example | |
| Description: A highly documented plugin that demonstrates how to create custom admin list-tables from database using WP_List_Table class. | |
| Version: 1.0 | |
| Author: Viramgami Jignesh | |
| Author URI: https://github.com/viramgamijignesh/ | |
| License: GPL2 | |
| */ |
| // 使用 userAgent 判断是否微信内置浏览器 | |
| // 不推荐使用 用户可能会自行修改浏览器的 userAgent | |
| if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) { | |
| return true; | |
| } | |
| // 使用微信 JS 对象判断是否微信内置浏览器 | |
| // 建议使用此方法进行判断 | |
| if( typeof WeixinJSBridge !== "undefined" ) { | |
| return true; |
| function interval(duration, fn){ | |
| this.baseline = undefined | |
| this.run = function(){ | |
| if(this.baseline === undefined){ | |
| this.baseline = new Date().getTime() | |
| } | |
| fn() | |
| var end = new Date().getTime() | |
| this.baseline += duration |