Commit 35fb5fa4 by Nate Hardison

Add wrapper task to start LMS/CMS server

The LMS/CMS server startup depends on the :assets task, which needs
to receive :system and :env arguments. Since the existing server
startup tasks didn't take a :system argument, a new command called
:runserver is created that does take :system, :env, and :options
arguments. The old server startup tasks are adjusted to wrap the one
:runserver task that does all of the heavy lifting.
parent 1001b315
......@@ -15,14 +15,22 @@ task :fastlms do
sh("#{django_admin} runserver --traceback --settings=lms.envs.dev --pythonpath=.")
end
# Start :system locally with the specified :env and :options.
#
# This task should be invoked via the wrapper below, so we don't
# include a description to keep it from showing up in rake -T.
task :runserver, [:system, :env, :options] => [:install_prereqs, 'assets:_watch', :predjango] do |t, args|
sh(django_admin(args.system, args.env, 'runserver', args.options))
end
[:lms, :cms].each do |system|
desc <<-desc
Start the #{system} locally with the specified environment (defaults to dev).
Other useful environments are devplus (for dev testing with a real local database)
desc
task system, [:env, :options] => [:install_prereqs, 'assets:_watch', :predjango] do |t, args|
task system, [:env, :options] do |t, args|
args.with_defaults(:env => 'dev', :options => default_options[system])
sh(django_admin(system, args.env, 'runserver', args.options))
task(:runserver).invoke(system, args.env, args.options)
end
desc "Start #{system} Celery worker"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment