cubicweb/pyramid/pyramidctl.py
branch3.25
changeset 12216 4de5927871f9
parent 12053 c3c9f2e1424c
child 12530 9d88e1177c35
child 12748 9fa65579520f
equal deleted inserted replaced
12215:b9ffd3216187 12216:4de5927871f9
   348             profile_dump_every=self['profile-dump-every']
   348             profile_dump_every=self['profile-dump-every']
   349         )
   349         )
   350 
   350 
   351         host = cwconfig['interface']
   351         host = cwconfig['interface']
   352         port = cwconfig['port'] or 8080
   352         port = cwconfig['port'] or 8080
       
   353         url_scheme = ('https' if cwconfig['base-url'].startswith('https')
       
   354                       else 'http')
   353         repo = app.application.registry['cubicweb.repository']
   355         repo = app.application.registry['cubicweb.repository']
   354         warnings.warn(
   356         warnings.warn(
   355             'the "pyramid" command does not start repository "looping tasks" '
   357             'the "pyramid" command does not start repository "looping tasks" '
   356             'anymore; use the standalone "scheduler" command if needed'
   358             'anymore; use the standalone "scheduler" command if needed'
   357         )
   359         )
   358         try:
   360         try:
   359             waitress.serve(app, host=host, port=port)
   361             waitress.serve(app, host=host, port=port, url_scheme=url_scheme)
   360         finally:
   362         finally:
   361             repo.shutdown()
   363             repo.shutdown()
   362         if self._needreload:
   364         if self._needreload:
   363             return 3
   365             return 3
   364         return 0
   366         return 0