Syrupy is a Python script that regularly takes snapshots of the memory and CPU load of one or more running processes, so as to dynamically build up a profile of their usage of system resources.
文章属于类别 Python
当Django1.5遇上uwsgi-1.0.4:查不到最新数据
最近做的功能,涉及ORM,数据明明已经插入数据库,但在页面上却查不到,一开始以为是cache的问题,但最后google发现是Django和uwsgi直接衔接出了问题:
Using #django 1.5 on #uwsgi ? You’ll want at least 1.3, otherwise DB connections aren’t closed between requests.
解决办法就是升级uwsgi
参考:
https://twitter.com/raphaelbarrois/status/337924659666362368
https://groups.google.com/forum/#!topic/django-users/8OgkXAjuvDM
func热更新模块
我们使用的salt是可以热更新模块的,最近在看func,所以想实现一番
代码请猛击下面的地址,比较暴力的实现方法
假设你增加一个文件,里面有一个ping方法
/usr/local/lib/python2.7/site-packages/func/minion/modules/mc_ping.py
则直接执行下面的命令即可,无需重启func
func “*129*” call mc_ping ping