brotherton-erpnext/patches/december_2012/move_recent_to_memcache.py

7 lines
250 B
Python
Raw Normal View History

2012-12-12 09:12:17 +00:00
import webnotes, json
def execute():
for p in webnotes.conn.sql("""select name, recent_documents from
tabProfile where ifnull(recent_documents,'')!=''"""):
if not '~~~' in p[1]:
webnotes.cache().set_value("recent:" + p[0], json.loads(p[1]))