fixed missing folder in start scheduler

This commit is contained in:
mdipierro
2019-05-05 20:49:56 -07:00
parent 091f13df43
commit c59186fa64
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -291,9 +291,7 @@ def w2p_unpack(filename, path, delete_tar=True):
if delete_tar:
os.unlink(tarname)
def create_app(path):
w2p_unpack('welcome.w2p', path)
def create_missing_folders(path):
for subfolder in ('models', 'views', 'controllers', 'databases',
'modules', 'cron', 'errors', 'sessions',
'languages', 'static', 'private', 'uploads'):
@@ -301,6 +299,9 @@ def create_app(path):
if not os.path.exists(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):
"""Packs the given plugin into a w2p file.
+2 -1
View File
@@ -23,7 +23,7 @@ import logging
import getpass
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.settings import global_settings
from gluon.shell import die, run, test
@@ -368,6 +368,7 @@ class web2pyDialog(object):
def try_start_scheduler(self, app):
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.start()