DYoung
DYoung

Reputation: 861

Ladon auto-refresh module/code

I have a Ladon service that currently uses one service module named register, behind that is code in services/register.py. Other frameworks, such as .NET and Java, will automatically compile & reload code/classes when the underlying physical file changes on disk without requiring a restart of the application server.

In this case I have the Ladon app server running on port 8080, if I make changes to services/register.py I have to stop and restart the app server. It's not critical, the app isn't go to be in a highly available environment, it's annoying more than anything (and I'm curious). Does Ladon offer any similar feature? I've had no luck finding a way to do this.

Code used to start up the app server:

scriptdir = dirname(abspath(__file__))
service_modules = ['register']

# Create the WSGI Application
application = LadonWSGIApplication(
    service_modules,
    [join(scriptdir, 'services'), join(scriptdir, 'appearance')],
    catalog_name='Serisma web services',
    catalog_desc='All web services', logging=31)

if __name__ == '__main__':
    port = 8080
    print("\nServices running on localhost:%(port)s\n" % {'port': port})

    server = wsgiref.simple_server.make_server('', port, application)
    server.serve_forever()

Environment details:

Upvotes: 1

Views: 52

Answers (0)

Related Questions