Skip to content

Add dev command to run in native envs. - #3488

Merged
auraz merged 1 commit into
masterfrom
alex/paver_dev
May 13, 2014
Merged

Add dev command to run in native envs.#3488
auraz merged 1 commit into
masterfrom
alex/paver_dev

Conversation

@auraz

@auraz auraz commented Apr 28, 2014

Copy link
Copy Markdown
Contributor

I have some issues with paver, local Mac OS dev env.

  1. when i do
    paver run_all_servers --settings=dev --worker_settings=celery
    Ctrl-C
    and
    paver run_all_servers --settings=dev --worker_settings=celery
    second time
    I got
0 errors found
Django version 1.4.8, using settings 'cms.envs.dev'
Development server is running at http://0.0.0.0:8001/
Quit the server with CONTROL-C.
Error: [Errno 48] Address already in use
0 errors found
Django version 1.4.8, using settings 'lms.envs.dev'
Development server is running at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Error: [Errno 48] Address already in use
  1. If in one terminal window I do
    paver studio --settings=dev
    and in second terminal window I do
    paver lms --settings=cms.dev
    In 1st terminal process is aborted with next message:
0 errors found
Django version 1.4.8, using settings 'cms.envs.dev'
Development server is running at http://0.0.0.0:8001/
Quit the server with CONTROL-C.
  overwrite lms/static/sass/application-extend1.css
  overwrite lms/static/sass/application-extend2.css
  overwrite lms/static/sass/application.css
  overwrite lms/static/sass/course.css
    CHANGED: /Users/kry/mitx_all/edx-platform/lms/static/sass/application-extend1.scss
sass --style compressed --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
Processes ending

And vice versa.

@singingwolfboy please review.

@singingwolfboy

Copy link
Copy Markdown
Contributor

I'm not clear on how this pull request solves your two problems here. For the first problem, looks like you want to fix paver's run_all_servers command, so that hitting ctrl-C will correctly stop the servers. git blame says that @wedaly wrote that code -- @wedaly, can you take a look at this?

I'm not sure what's going on with your second problem -- sounds like the second process is killing the first process. Can you track down what's causing that?

Either way, I don't think that adding another paver task is the right solution to this problem.

@auraz

auraz commented Apr 28, 2014

Copy link
Copy Markdown
Contributor Author

This PR solves 3rd problem: allow run LMS and Studio in dev env.

2nd problem - have no idea how I can track it down.

@singingwolfboy

Copy link
Copy Markdown
Contributor

@auraz instead of creating a new paver task, can you modify the existing run_all_servers task?

@auraz

auraz commented Apr 28, 2014

Copy link
Copy Markdown
Contributor Author

@singingwolfboy Done, please continue review.

@singingwolfboy

Copy link
Copy Markdown
Contributor

Rather than --settings and --lms, I feel like a more intuitive interface would be:

  • --settings: set both lms and cms
  • --settings-cms: set cms only, overriding the value from --settings (if provided)
  • --settings-lms: set lms only, overriding value from --settings (if provided)

You could also make the run_all_servers task default to dev for cms and cms.dev for lms. That seems like a sensible default to me.

@auraz

auraz commented Apr 28, 2014

Copy link
Copy Markdown
Contributor Author

makes sense.

@auraz

auraz commented Apr 29, 2014

Copy link
Copy Markdown
Contributor Author

Except the last one: default worker is 'dev_with_worker' which is not suit for local env. For local env, default worker should be 'celery'

@auraz

auraz commented Apr 29, 2014

Copy link
Copy Markdown
Contributor Author

@singingwolfboy please continue review

@singingwolfboy

Copy link
Copy Markdown
Contributor

Looks great! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants