From d24f3f01400a5aa458d4eb9582344e4041fc6c7f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 26 Apr 2012 10:53:45 +0530 Subject: [PATCH] fixes in installer and scheduler --- py/webnotes/install_lib/install.py | 2 +- py/webnotes/utils/scheduler.py | 4 +++- wnf.py | 11 ++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/py/webnotes/install_lib/install.py b/py/webnotes/install_lib/install.py index 092a4808b9..bc70ebe450 100755 --- a/py/webnotes/install_lib/install.py +++ b/py/webnotes/install_lib/install.py @@ -139,7 +139,7 @@ class Installer: self.dbman.drop_table('__CacheItem') webnotes.conn.sql("""create table __CacheItem( `key` VARCHAR(180) NOT NULL PRIMARY KEY, - `value` TEXT, + `value` LONGTEXT, `expires_on` TIMESTAMP )""") diff --git a/py/webnotes/utils/scheduler.py b/py/webnotes/utils/scheduler.py index 76d33e25a6..9d66f70922 100644 --- a/py/webnotes/utils/scheduler.py +++ b/py/webnotes/utils/scheduler.py @@ -48,7 +48,8 @@ def execute(): if not webnotes.conn: webnotes.connect() - + + webnotes.connect.begin() out = [] # if first task of the day execute daily tasks @@ -73,6 +74,7 @@ def execute(): out.append('all:' + trigger('execute_all')) webnotes.conn.set_global('scheduler_last_event', nowtime.strftime(format)) + webnotes.conn.commit() return '\n'.join(out) diff --git a/wnf.py b/wnf.py index bbe884b361..f9d8835971 100755 --- a/wnf.py +++ b/wnf.py @@ -94,6 +94,10 @@ def setup_options(): parser.add_option("--push", nargs=3, default=False, metavar = "remote branch comment", help="git commit + push (both repos) [remote] [branch] [comment]") + parser.add_option("--checkout", nargs=1, default=False, + metavar = "branch", + help="git checkout [branch]") + parser.add_option("-l", "--latest", action="store_true", dest="run_latest", default=False, help="Apply the latest patches") @@ -197,7 +201,12 @@ def run(): os.chdir('lib') os.system('git commit -a -m "%s"' % options.push[2]) os.system('git push %s %s' % (options.push[0], options.push[1])) - + + elif options.checkout: + os.system('git checkout %s' % options.checkout) + os.chdir('lib') + os.system('git checkout %s' % options.checkout) + # patch elif options.patch_list: # clear log