阅读背景:

Python设置和“in”关键字使用问题

来源:互联网 

I'm trying to work with a set of django models in an external script. I'm querying the database at a preset interval to get the items that meet the query. When my external script is processing them, it takes a while and I may get the same results in the query if the processing hasn't updated the model yet. I figured I could use a set or list to store the items processing and check each model from the query result to ensure it isn't currently processing. When trying this though, it seems the in keyword always returns True. Any thoughts?I'm trying to work with a set of django models




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: