fixes in installer and scheduler

This commit is contained in:
Anand Doshi 2012-04-26 10:53:45 +05:30
parent 65726edd59
commit d24f3f0140
3 changed files with 14 additions and 3 deletions

View file

@ -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
)""")

View file

@ -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)

11
wnf.py
View file

@ -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