GithubHelp home page GithubHelp logo

Comments (2)

jwood106 avatar jwood106 commented on July 4, 2024

Saw Tyler created this issue. Pasting a change I made locally in attempt to address this issue. Not convinced it is the solution, and may spark better idea.

Synopsis: add a 'start django' task and run both the existing 'restart django' and the new 'start django' tasks, allowing the provision to continue (instead of the current halt) if it fails. If django is already started, 'restart-django' task should succeed, if django is not already started, 'start django' task should succeed.

Changes to two files:

scripts/provision/admin.yml
(add use of start django)

 - name: gunicorn-app
   copy: src=files/gunicorn-app.sh dest=/srv/scripts/gunicorn-app.sh mode=650 owner=mapstory group=www-data
-  notify: [restart django]
+  notify: [start django, restart django]
   tags: [config, files, gunicorn]

 - name: supervisor-gunicorn
   copy: src=files/supervisor-gunicorn-django.conf dest=/etc/supervisor/conf.d
-  notify: [reload supervisor, restart django]
+  notify: [reload supervisor, start django, restart django]
   tags: [config, gunicorn]

scripts/provisions/handlers.yml
(add definition of start django, add ignore_errors to existing restart django)

- name: restart django
  supervisorctl: name=gunicorn-django state=started
  sudo: yes
  sudo_user: root
  notify: check django running
+ # jcw - allow it to fail, might not be started.
+ ignore_errors: True

+  - name: start django
+  supervisorctl: name=gunicorn-django state=started
+  sudo: yes
+  sudo_user: root
+  notify: check django running
+ # jcw - allow it to fail, might already be started.
+  ignore_errors: True

from mapstory.

garnertb avatar garnertb commented on July 4, 2024

This is fixed.

from mapstory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.