fixed missing folder in start scheduler
This commit is contained in:
+4
-3
@@ -291,9 +291,7 @@ def w2p_unpack(filename, path, delete_tar=True):
|
|||||||
if delete_tar:
|
if delete_tar:
|
||||||
os.unlink(tarname)
|
os.unlink(tarname)
|
||||||
|
|
||||||
|
def create_missing_folders(path):
|
||||||
def create_app(path):
|
|
||||||
w2p_unpack('welcome.w2p', path)
|
|
||||||
for subfolder in ('models', 'views', 'controllers', 'databases',
|
for subfolder in ('models', 'views', 'controllers', 'databases',
|
||||||
'modules', 'cron', 'errors', 'sessions',
|
'modules', 'cron', 'errors', 'sessions',
|
||||||
'languages', 'static', 'private', 'uploads'):
|
'languages', 'static', 'private', 'uploads'):
|
||||||
@@ -301,6 +299,9 @@ def create_app(path):
|
|||||||
if not os.path.exists(subpath):
|
if not os.path.exists(subpath):
|
||||||
os.mkdir(subpath)
|
os.mkdir(subpath)
|
||||||
|
|
||||||
|
def create_app(path):
|
||||||
|
w2p_unpack('welcome.w2p', path)
|
||||||
|
create_missing_folders(path)
|
||||||
|
|
||||||
def w2p_pack_plugin(filename, path, plugin_name):
|
def w2p_pack_plugin(filename, path, plugin_name):
|
||||||
"""Packs the given plugin into a w2p file.
|
"""Packs the given plugin into a w2p file.
|
||||||
|
|||||||
+2
-1
@@ -23,7 +23,7 @@ import logging
|
|||||||
import getpass
|
import getpass
|
||||||
|
|
||||||
from gluon import main, newcron
|
from gluon import main, newcron
|
||||||
from gluon.fileutils import read_file, create_welcome_w2p
|
from gluon.fileutils import read_file, create_welcome_w2p, create_missing_folders
|
||||||
from gluon.console import console
|
from gluon.console import console
|
||||||
from gluon.settings import global_settings
|
from gluon.settings import global_settings
|
||||||
from gluon.shell import die, run, test
|
from gluon.shell import die, run, test
|
||||||
@@ -368,6 +368,7 @@ class web2pyDialog(object):
|
|||||||
|
|
||||||
def try_start_scheduler(self, app):
|
def try_start_scheduler(self, app):
|
||||||
if app not in self.scheduler_processes:
|
if app not in self.scheduler_processes:
|
||||||
|
create_missing_folders(os.path.join(self.options.folder, 'applications', app))
|
||||||
t = threading.Thread(target=self.start_schedulers, args=(app,))
|
t = threading.Thread(target=self.start_schedulers, args=(app,))
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user