Hi Damian,

Il 30/06/2012 01:27, Damian Usnarski ha scritto:
uWSGI instance can be reset in several ways. At the moment we have the
ability to reset the instance by using signals, a console, using uWSGI API,
touch-reload and even remotely.

Using a touch-reload, we can simply reset the instance using the command
"touch reload-file" from the console.
Unfortunately, uWSGI requires that the file already existed at the start of
the instance, and if the file does not exist, uWSGI starts throw errors:

unable to stat() (..)/reload.app, events will be triggered as soon as the
file is created

This may be considered a usability bug at least

uWSGI should check at the start of the presence of this file, and if the
file does not exist should wait until the file is created, rather than
throw an error every second. I have not tested yet what happens when you
remove this file while running uWSGI, but the behavior should be the same
as at the start - uWSGI should monitor whether the file exists, and if not,
should not throw errors.

Personally i'd just try to create the file if it does not exist

In addition, it would be nice if uWSGI had a
possibility to delete this file immediately after the restart was
initiated, but it does not match with the concept of "touch-reload",

Definetely a different concept :)

so I
have another proposal - add a new possibility to reset the instance uWSGI :

file-reload - monitor whether a file is present, if so, uWSGI should reset
a instance.
>
file-reload-utilize - immediately after initiating a restart, uWSGI deletes
a file specified in the parameter "file-reload". If not, uWSI should treat
this file as "touch-reload" - resets the instance each time the file will
be "touched".

This will help developers who do not have access to the console and admin
panel, from which they can reset the whole instance.

How are you supposed to create the file without console? Anyway are you sure you just don't want to implement this logic using @filemon
http://projects.unbit.it/uwsgi/wiki/Decorators ?

thanks,
riccardo
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to