1

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:

  • Darwin hostname 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
  • Python 2.7.13 :: Anaconda 4.3.1 (x86_64)
  • ladon 1.0.2
DYoung
  • 841
  • 1
  • 6
  • 11

0 Answers0