Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait
2012-03-19 16:27:42 +05:30
19 changed files with 159 additions and 53 deletions

10
wnf.py
View File

@@ -117,6 +117,9 @@ def setup_options():
parser.add_option("--replace", nargs=3, default=False,
metavar = "search replace_by extension",
help="file search-replace")
parser.add_option("--cci", nargs=1, metavar="CacheItem Key",
help="Clear Cache Item")
return parser.parse_args()
@@ -229,6 +232,13 @@ def run():
import webnotes.utils.scheduler
print webnotes.utils.scheduler.trigger('execute_' + options.run_scheduler_event)
elif options.cci is not None:
if options.cci=='all':
webnotes.conn.sql("DELETE FROM __CacheItem")
else:
from webnotes.utils.cache import CacheItem
CacheItem(options.cci).clear()
# print messages
if webnotes.message_log:
print '\n'.join(webnotes.message_log)