On Thu, Oct 4, 2012 at 8:04 AM, Łukasz Mierzwa <[email protected]> wrote:
> 1.3.1-dev-f1135c7 from git works fine with both @timer and @rbtimer.
> Seems unlikely since it's a core feature but maybe I need to load some
> additional plugin under ubuntu, or set some additional options?
somewhat unrelated, but we also originally tried using the timer stuff
to manage django reloads ... while it does work, IMO our current
method is much better:
# cat devel-conf.sh
===============================================
#!/bin/bash
IFS=$'\n'
shopt -s extglob nullglob
i=0
v=${VIRTUAL_ENV}
f=$(readlink -f ${BASH_SOURCE[0]})
c=$(cd $(dirname ${f}) && pwd)/
b=$(cd $(dirname ${c}) && pwd)/
t=( ${b} ) &&
[[ ${v:0:${#b}} != ${b} ]] &&
t+=( ${v} )
out () { echo "${@}"; }
msg () { echo "${@}"; } >&2
wnd () { COLUMNS=$(tput cols); LINES=$(tput lines); }
sep () { printf %s "${s[@]:0:${1:-${COLUMNS:-80}}}"; echo; } >&2
s=( {,,,,}{,,,}{-,-}{,,,}{,,,,} )
trap wnd SIGWINCH; wnd
out '[uwsgi]'
while read -r x; do out ${x}; let i++; done < <(
find "${t[@]}" '(' -regextype posix-extended \
-name '*.git' -prune ')' \
-o '(' -regex '.*[.](py|ini|xml|html|json)' \
-printf 'touch-reload = %p\n' ')' )
sep
msg "INFO: watching ${i} files ..."
sep
===============================================
... then just `chmod +x` and:
uwsgi [...] --ini exec://devel-conf.sh [...]
... this will generate a config full of `touch-reload` options (nearly
3000 in my case), watching many useful files in the VIRTUAL_ENV (i
have to patch 3rd party libs more often than i'd like) and the project
dir.
you'll probably need to tweak the paths a bit for your setup.
--
C Anthony
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi