from mediagoblin.db.open import setup_connection_and_db_from_config
from mediagoblin.globals import setup_globals
from mediagoblin.celery_setup import setup_celery_from_config
+from mediagoblin.process_media.workbench import (
+ WorkbenchManager, DEFAULT_WORKBENCH_DIR)
class Error(Exception): pass
public_store, queue_store,
staticdirector,
email_sender_address, email_debug_mode,
- user_template_path=None):
+ user_template_path=None,
+ workbench_path=DEFAULT_WORKBENCH_DIR):
# Get the template environment
self.template_loader = util.get_jinja_loader(user_template_path)
db_connection=connection,
database=self.db,
public_store=self.public_store,
- queue_store=self.queue_store)
+ queue_store=self.queue_store,
+ workbench_manager=WorkbenchManager(workbench_path))
def __call__(self, environ, start_response):
request = Request(environ)
email_sender_address=app_config.get(
'email_sender_address', 'notice@mediagoblin.example.org'),
email_debug_mode=asbool(app_config.get('email_debug_mode')),
- user_template_path=app_config.get('local_templates'))
+ user_template_path=app_config.get('local_templates'),
+ workbench_path=app_config.get('workbench_path', DEFAULT_WORKBENCH_DIR))
return mgoblin_app
from mediagoblin.db.open import setup_connection_and_db_from_config
from mediagoblin.celery_setup import setup_celery_from_config
from mediagoblin.globals import setup_globals
-from mediagoblin import globals as mgoblin_globals
+from mediagoblin.process_media.workbench import (
+ WorkbenchManager, DEFAULT_WORKBENCH_DIR)
OUR_MODULENAME = 'mediagoblin.celery_setup.from_celery'
queue_store = storage.storage_system_from_paste_config(
mgoblin_section, 'queuestore')
+ workbench_manager = WorkbenchManager(
+ mgoblin_section.get(
+ 'workbench_path', DEFAULT_WORKBENCH_DIR))
+
setup_globals_func(
db_connection=connection,
database=db,
email_sender_address=mgoblin_section.get(
'email_sender_address',
'notice@mediagoblin.example.org'),
- queue_store=queue_store)
+ queue_store=queue_store,
+ workbench_manager=workbench_manager)
if os.environ['CELERY_CONFIG_MODULE'] == OUR_MODULENAME: