> From: [email protected] > Subject: uWSGI Digest, Vol 57, Issue 7 > To: [email protected] > Date: Mon, 16 Jun 2014 12:00:03 +0200 > > Send uWSGI mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of uWSGI digest..." > > > Today's Topics: > > 1. Re: Running unit test error (Aarni Koskela) > 2. I wrote a script analyzes uwsgi access log for slow requests > (piglei) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 16 Jun 2014 09:14:39 +0000 > From: Aarni Koskela <[email protected]> > To: uWSGI developers and users list <[email protected]> > Subject: Re: [uWSGI] Running unit test error > Message-ID: > > <7561d3e4ea2a4c31b7481ea4109d5...@db4pr07mb316.eurprd07.prod.outlook.com> > > Content-Type: text/plain; charset="iso-8859-1" > > This would be an useful recipe to put in the docs. > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Roberto De Ioris > Sent: 16. kes?kuuta 2014 11:30 > To: uWSGI developers and users list > Subject: Re: [uWSGI] Running unit test error > > > > Hi guys, > > Under development mode, I would like to run django unit test cases > > like so > > : > > %(virtualenv)/bin/python %(chdir)/manage.py test > > --liveserver=localhost:8423-9078 fooapp as a cron command under a > > separate standalone uwsgi process. > > I have an error message : ImportError: No module named uwsgi > > On the side, i have another uwsgi process running the development > > django webserver(i.e. runserver ...) I would like the uwsgi process > > running test cases to bug me(ie show error > > messages) as soon as a test case fails as soon as there codes changes > > on the second uwsgi running the django webserver. > > I saw on the internet somewhere, where you could define a python > > generator which catches the 'import error' and justcalls the called > > function. > > Could you have any suggestions of running test cases under uwsgi for > > django or anything. > > Thank you guys for you work, > > Richard > > *** Starting uWSGI 2.0.5.1 (64bit) on [Sun Jun 15 20:59:00 2014] > > ***compiled with version: 4.2.1 Compatible FreeBSD Clang 3.3 > > (tags/RELEASE_33/final 183502) on 02 June 2014 13:38:15os: > > FreeBSD-10.0-RELEASE-p12 FreeBSD 10.0-RELEASE-p12 #0: Wed Jun 4 > > 14:50:48 UTC 2014 > > [email protected]:/usr/obj/usr/src/sys/GENERICmachine: > > amd64clock source: unixpcre jit disableddetected number of CPU cores: 2 > > _______________________________________________ > > > > > Would not be easier to use uWSGI as the development server ? > > Add --py-autoreload=n to enabel auto-reloading on code changes, and add a > hook to call the test suite at every change (instead of cron): > > [uwsgi] > ... > py-autoreload = 1 > hook-post-app = cmd:%(virtualenv)/bin/python %(chdir)/manage.py test > --liveserver=localhost:8423-9078 fooapp > > with those 2 options combined, your instance will die as soon as the test > fails > > > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ >
Thanks Roberto, I have tried your way but i having another error : hook action not found, please see output below *** Starting uWSGI 2.0.5.1 (64bit) on [Wed Jun 18 17:11:28 2014] ***compiled with version: 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502) on 02 June 2014 13:38:15os: FreeBSD-10.0-RELEASE-p12 FreeBSD 10.0-RELEASE-p12 #0: Wed Jun 4 14:50:48 UTC 2014 [email protected]:/usr/obj/usr/src/sys/GENERICmachine: amd64clock source: unixpcre jit disableddetected number of CPU cores: 2current working directory: /usr/home/duvaxwriting pidfile to /tmp/tmp.pidyour processes number limit is 9000your memory page size is 4096 bytesdetected max file descriptor number: 91386lock engine: POSIX semaphoresthunder lock: enableduwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 7Python version: 2.7.6 (default, Mar 4 2014, 19:30:28) [GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)]Python main interpreter initialized at 0x803c26300python threads support enabledyour server socket listen backlog is limited to 100 connectionsyour mercy for graceful operations on workers is 60 secondsmapped 310944 bytes (303 KB) for 8 cores*** Operational MODE: preforking+threaded ***WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x803c26300 pid: 15265 (default app)hook action not found: %(virtualenv)//bin/python %(chdir)/manage.py test --liveserver=localhostVACUUM: pidfile removed. On the side i noticied that the hook action command printed command( above) is not complete. the whole command is : hook-post-app = %(virtualenv)/bin/python %(chdir)/manage.py test --liveserver=localhost:8423-9078 fooapp --settings=project.settings.development Any reasons why this is happening ? Thanks, Richard
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
