Exemplo n.º 1
0
def serve_dativetop_gui(old_service, dative_app, dtserver):
    _repair_dativetop_gui_index_html(old_service, dative_app, dtserver)
    return dtutils.Service(name='DTGUI',
                           url=DATIVETOP_GUI_URL,
                           stopper=serve_local_js_app('DTGUI',
                                                      DATIVETOP_GUI_URL,
                                                      DATIVETOP_GUI_ROOT))
Exemplo n.º 2
0
def serve_old(old):
    """Serve the OLD locally in a separate thread that forks a subprocess that
    invokes the pserve executable. Return a function that stops serving the OLD.
    """
    return dtutils.Service(name=old.name,
                           url=old.url,
                           stopper=serve_pyr(old.name,
                                             old.url,
                                             OLD_DIR,
                                             config='configlocal.ini'))
Exemplo n.º 3
0
def serve_dativetop_server():
    """Serve the DativeTop Server locally in a separate thread that forks a
    subprocess that invokes the pserve executable. Return a function that stops
    serving the OLD.
    """
    # TODO: dynamically generate available DTServer URL ...
    return dtutils.Service(
        name='DTServer',
        url=DATIVETOP_SERVER_URL,
        stopper=serve_pyr(
            'DativeTop Server', DATIVETOP_SERVER_URL, DATIVETOP_SERVER_DIR))
Exemplo n.º 4
0
def fetch_dative_app():
    return dtutils.Service(
        name='DativeApp',
        url=requests.get(
            '{}/dative_app'.format(c.DATIVETOP_SERVER_URL)).json()['url'],
        stopper=None)
Exemplo n.º 5
0
def fetch_old_service():
    return dtutils.Service(
        name='OLDService',
        url=requests.get(
            '{}/old_service'.format(c.DATIVETOP_SERVER_URL)).json()['url'],
        stopper=None)