On Monday, January 20, 2020 at 10:55:28 PM UTC-8, Simon Dreyer wrote:
>
> Hi Folks, I have an existing python application that reads data from 
> industrial controllers and publishes it to a message queue. The application 
> is currently headless and logs errors and events to a log file. I would 
> like to add a web interface to the application so that I can log into the 
> app at any time and check the status while it is running. All the web2py 
> examples that I have seen seem to load/run a python script when the user 
> invokes a view, how would I invoke a connection to a script that is already 
> running please?
>

The first idea I have is just to return the latest entries from the log 
file.  

If your control application is polling the controllers, you can set up 
something else for it to poll, and put something there with the web app, 
and issue a response to it.

If you control application is being pinged by the controllers, perhaps you 
can use a socket to ping it from the web app.

Much beyond that handwaving response would require knowing more about the 
existing architecture.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ef610cf9-326d-4376-afa8-2588b52eadfc%40googlegroups.com.

Reply via email to