Il 31/05/2016 12:49, Markus Mohrhard ha scritto:
Hey Riccardo,
On Mon, May 30, 2016 at 9:47 AM, Riccardo Magliocchetti
<riccardo.magliocchetti@gmail.com <mailto:riccardo.magliocchetti@gmail.com>> wrote:
Yep, since you are using uwsgi (and if you are willing to use it also in
development) you can leverage its spooler or cron functionalities [1] to
handle these tasks. Or they can be implemented as django management commands
so you don't need another script to call them via http.
[1] http://uwsgi-docs.readthedocs.io/en/latest/PythonDecorators.html
What would be the advantage to writing a python management script that works
through http?
None, what i am suggesting is to avoid http for management commands :)
> My plan was to write a python management script and add it as a
cron job (about one minute for the processing of uploaded crashes and once a day
for the crash count).
Calling a cron every minute seems a bit silly though, better use a queue in my
opinion (like uwsgi spooler).
The advantage that I currently see for an independent script is that I can call
it from wherever I am. Not only if I'm logged-in. What would be the benefit of
the other solutions?
It's self contained and you don't need to setup anything outside your app.
Hope to have some time to poke at this the next weekend.
--
Riccardo Magliocchetti
@rmistaken
http://menodizero.it
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.