Skip to content

Commit

Permalink
fix: Only watch_in uwsgi if used by Python app, #455
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Aug 10, 2023
1 parent 970773f commit 60dadbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion salt/lib.sls
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ unset {{ setting_name }} in {{ filename }}:
- virtualenv: {{ directory }}-piptools
# Run the command if the virtual environment was reinstalled (64501d6) or the requirements file was changed.
- onchanges: {{ ([{'virtualenv': directory + '-piptools'}] + [requirements_file])|yaml }}
# https://github.com/open-contracting/deploy/issues/146
{% if watch_in %}
- watch_in:
- service: {{ watch_in }}
{% endif %}
{% endmacro %}

{#
Expand Down
3 changes: 2 additions & 1 deletion salt/python_apps.sls
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ include:
- user: {{ entry.user }}_user_exists
# Note: {{ directory }}-requirements will run if git changed (not only if requirements changed), and uwsgi will be reloaded.
{{ virtualenv(directory, entry.user, {'git': entry.git.url}, {'git': entry.git.url}, 'uwsgi') }}
# https://github.com/open-contracting/deploy/issues/146
{{ virtualenv(directory, entry.user, {'git': entry.git.url}, {'git': entry.git.url}, 'uwsgi' if 'uwsgi' in entry else None) }}
{% for filename, source in entry.config|items %}
{{ userdir }}/.config/{{ filename }}:
Expand Down

0 comments on commit 60dadbf

Please sign in to comment.