Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a3004de9
Commit
a3004de9
authored
May 13, 2014
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3488 from edx/alex/paver_dev
Add dev command to run in native envs.
parents
c30665fb
c1328246
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
docs/en_us/developers/source/pavelib.rst
+6
-1
pavelib/servers.py
+14
-7
No files found.
docs/en_us/developers/source/pavelib.rst
View file @
a3004de9
...
...
@@ -140,7 +140,12 @@ Run Servers
**run_celery**: runs celery for specified system
*--settings=* Environment settings e.g. aws, dev
*--settings=* Environment settings e.g. aws, dev both for LMS and Studio
*--settings_lms=* Override django settings for LMS e.g. cms.dev
*--settings_cms=* Override django settings for Studio
::
...
...
pavelib/servers.py
View file @
a3004de9
...
...
@@ -105,26 +105,33 @@ def celery(options):
@task
@needs
(
'pavelib.prereqs.install_prereqs'
)
@cmdopts
([
(
"settings="
,
"s"
,
"Django settings"
),
(
"settings="
,
"s"
,
"Django settings
for both LMS and Studio
"
),
(
"worker_settings="
,
"w"
,
"Celery worker Django settings"
),
(
"fast"
,
"f"
,
"Skip updating assets"
)
(
"fast"
,
"f"
,
"Skip updating assets"
),
(
"settings_lms="
,
"l"
,
"Set LMS only, overriding the value from --settings (if provided)"
),
(
"settings_cms="
,
"c"
,
"Set Studio only, overriding the value from --settings (if provided)"
),
])
def
run_all_servers
(
options
):
"""
Runs Celery workers, Studio, and LMS.
"""
settings
=
getattr
(
options
,
'settings'
,
'dev'
)
settings_lms
=
getattr
(
options
,
'settings_lms'
,
settings
)
settings_cms
=
getattr
(
options
,
'settings_cms'
,
settings
)
worker_settings
=
getattr
(
options
,
'worker_settings'
,
'dev_with_worker'
)
fast
=
getattr
(
options
,
'fast'
,
False
)
if
not
fast
:
for
system
in
[
'lms'
,
'studio'
]:
args
=
[
system
,
'--settings={}'
.
format
(
settings
),
'--skip-collect'
]
call_task
(
'pavelib.assets.update_assets'
,
args
=
args
)
args
=
[
'lms'
,
'--settings={}'
.
format
(
settings_lms
),
'--skip-collect'
]
call_task
(
'pavelib.assets.update_assets'
,
args
=
args
)
args
=
[
'studio'
,
'--settings={}'
.
format
(
settings_cms
),
'--skip-collect'
]
call_task
(
'pavelib.assets.update_assets'
,
args
=
args
)
call_task
(
'pavelib.assets.watch_assets'
,
options
=
{
'background'
:
True
})
run_multi_processes
([
django_cmd
(
'lms'
,
settings
,
'runserver'
,
'--traceback'
,
'--pythonpath=.'
,
"0.0.0.0:{}"
.
format
(
DEFAULT_PORT
[
'lms'
])),
django_cmd
(
'studio'
,
settings
,
'runserver'
,
'--traceback'
,
'--pythonpath=.'
,
"0.0.0.0:{}"
.
format
(
DEFAULT_PORT
[
'studio'
])),
django_cmd
(
'lms'
,
settings
_lms
,
'runserver'
,
'--traceback'
,
'--pythonpath=.'
,
"0.0.0.0:{}"
.
format
(
DEFAULT_PORT
[
'lms'
])),
django_cmd
(
'studio'
,
settings
_cms
,
'runserver'
,
'--traceback'
,
'--pythonpath=.'
,
"0.0.0.0:{}"
.
format
(
DEFAULT_PORT
[
'studio'
])),
django_cmd
(
'lms'
,
worker_settings
,
'celery'
,
'worker'
,
'--loglevel=INFO'
,
'--pythonpath=.'
)
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment