Django的orm有问题?
"Arui Zen" <[email protected]> Tue, 22 Jan 2008 10:53:43 +0800
| Newsgroups | gmane.comp.python.chinese |
|---|---|
| Message-ID | <[email protected]> |
情况如下:
我的程序是一个server网关,需要7X24的跑,这里面用到如下一个函数:
def get_CustomerNo(slef,imr_jid,cs_name):
dbopt_logger.debug("--- get_CustomerNo begin ---")
dbopt_logger.debug(imr_jid)
dbopt_logger.debug(cs_name)
try:
result = cSs.objects.filter(imr=IMR.objects.get
(jid=imr_jid).imrID,cs_name=cs_name)[0].customerNo
except Exception,value:
dbopt_logger.error("*** get_CustomerNo error ,value is %s" %
value )
dbopt_logger.error("--- get_CustomerNo end ---")
return result
在shell下(python manage.py shell)运行,没有问题,比如imr_jid用hoho.testcom.com
cs_name用[email protected]
得到的result是2L
而且无论运行几次都是一样的结果,不回抛异常.
怪异的是,无论白天测试人员如何折腾这个程序,都不会有问题,就是如果一晚上不动它,第二天早上一来肯定走到这里就死掉!
输出的异常如下:
"*** get_CustomerNo error ,value is (0,'')
这是为啥?
Django的ORM是不是有问题啊?
Django的版本是: 0.97 pre
请帮忙分析一下.
--
DJ
_______________________________________________
python-chinese
Post: send [email protected]
Subscribe: send subscribe to [email protected]
Unsubscribe: send unsubscribe to [email protected]
Detail Info: http://python.cn/mailman/listinfo/python-chinese