Running a second wsgi script from within the first wsgi script

8 views
Skip to first unread message

Νίκος Βέργος

unread,
Sep 9, 2018, 6:00:29 PM9/9/18
to modwsgi

I have 3 wsgi scripts listening on 3 locations What i'm trying to run an wsgi script from within another wsgi script with the following statement.


pdata = subprocess.check_output( 'http://superhost.gr/' + page )


page = the location of another wsgi app.

The error i'am getting when for i.e i try to load http://superhost.gr/clientele


File http://superhost.gr/clientele *NOT* found


The other script by itself executes normally but NOT from within my app.py script.

Any ideas on how to execute a wsgi app (b) from within a wsgi app(a) and store the response as html data?

Graham Dumpleton

unread,
Sep 9, 2018, 7:15:37 PM9/9/18
to mod...@googlegroups.com
That function is meant to be given a command to execute, not a web address.


If you want to make web requests against another application, use the 'requests' module.

--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Νικόλαος Κούρας

unread,
Sep 9, 2018, 7:20:56 PM9/9/18
to mod...@googlegroups.com
Can you please tell me how should i write?

And what happens when we have a process already loaded for /clientele and /downloads waiting for browser hits and at the same time when '/' runs tries as well to loads that url locations as well?

You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modwsgi/iMLLZRkHu9I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.

Graham Dumpleton

unread,
Sep 9, 2018, 7:28:25 PM9/9/18
to mod...@googlegroups.com

On 10 Sep 2018, at 9:20 am, Νικόλαος Κούρας <ni...@superhost.gr> wrote:

Can you please tell me how should i write?

I can help when you have a specific issue related to mod_wsgi installation and configuration, or bugs in mod_wsgi. For more general programming there are better forums you can use, such as StackOverflow (https://stackoverflow.com/).

And what happens when we have a process already loaded for /clientele and /downloads waiting for browser hits and at the same time when '/' runs tries as well to loads that url locations as well?

The configuration you are using is multithreaded, meaning that multiple requests can be handled at the same time. You can read more details about different mod_wsgi configurations at:


I would really recommend you start looking up and researching these sorts of things yourself in order to learn. If you always depend on others to solve every single problem for you, you will not learn anything, nor get things done quickly. I have already given you way more of my time than is generally regarded as reasonable to expect. I do have my own work to do. So please start using StackOverflow for your programming issues now that mod_wsgi is working.

Νικόλαος Κούρας

unread,
Sep 9, 2018, 7:32:22 PM9/9/18
to mod...@googlegroups.com
Thank you very much for your time and effort to help me Graham, i appreciate it.
Reply all
Reply to author
Forward
0 new messages