Esempio n. 1
0
def main():
    import sys
    from flask_script import Manager
    from superdesk import COMMANDS
    from superdesk.ws import create_server

    if len(sys.argv) == 2 and sys.argv[1] == 'ws':
        create_server(application.config)
    else:
        manager = Manager(application)
        manager.run(COMMANDS)
Esempio n. 2
0
#!/usr/bin/env python
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license

from settings import WS_HOST, WS_PORT, LOG_SERVER_ADDRESS, LOG_SERVER_PORT
from superdesk.ws import create_server

if __name__ == '__main__':
    config = {
        'WS_HOST': WS_HOST,
        'WS_PORT': WS_PORT,
        'LOG_SERVER_ADDRESS': LOG_SERVER_ADDRESS,
        'LOG_SERVER_PORT': LOG_SERVER_PORT
    }
    create_server(config)
Esempio n. 3
0
#!/usr/bin/env python
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license


from settings import WS_HOST, WS_PORT, LOG_SERVER_ADDRESS, LOG_SERVER_PORT
from superdesk.ws import create_server


if __name__ == "__main__":
    config = {
        "WS_HOST": WS_HOST,
        "WS_PORT": WS_PORT,
        "LOG_SERVER_ADDRESS": LOG_SERVER_ADDRESS,
        "LOG_SERVER_PORT": LOG_SERVER_PORT,
    }
    create_server(config)
Esempio n. 4
0
import os
import logging

from superdesk.ws import create_server
from newsroom.web import NewsroomWebApp

if __name__ == '__main__':
    app = NewsroomWebApp('newsroom')
    host = '0.0.0.0'
    port = int(os.environ.get('PORT', '5100'))
    logging.info('listening on %s:%d', host, port)
    create_server(
        dict(
            WS_HOST=host,
            WS_PORT=port,
            BROKER_URL=app.config['CELERY_BROKER_URL'],
            WEBSOCKET_EXCHANGE=app.config['WEBSOCKET_EXCHANGE'],
        ))
Esempio n. 5
0
#!/usr/bin/env python
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license

from superdesk.ws import create_server
from app import get_app

if __name__ == '__main__':
    app = get_app()

    create_server(app.config)
Esempio n. 6
0
from app import get_app
from superdesk.ws import create_server

if __name__ == '__main__':
    app = get_app()
    create_server(app.config)