Exemplo n.º 1
0
def init_test_ws_server(cfg, db_ctl):
    """
    Initialize a test websocket server

    @param db_ctl: an initialized DB_Controller
    """
    kernel = RZ_Kernel()
    webapp = init_webapp(cfg, kernel, db_ctl)
    ws_srv = init_ws_interface(cfg, webapp)
    return ws_srv
Exemplo n.º 2
0
def init_test_ws_server(cfg, db_ctl):
    """
    Initialize a test websocket server

    @param db_ctl: an initialized DB_Controller
    """
    kernel = RZ_Kernel()
    webapp = init_webapp(cfg, kernel, db_ctl)
    ws_srv = init_ws_interface(cfg, webapp)
    return ws_srv
Exemplo n.º 3
0
Arquivo: rz.py Projeto: yuvadm/rhizi
 def __init__(self, config_dir):
     cfg = init_config(config_dir)
     kernel = RZ_Kernel()
     db_ctl = dbc.DB_Controller(cfg.db_base_url)
     kernel.db_ctl = db_ctl
     user_db = Fake_User_DB()
     webapp = init_webapp(cfg, kernel)
     webapp.user_db = user_db
     kernel.db_op_factory = webapp  # assist kernel with DB initialization
     kernel.start()
     time.sleep(0.1)
     self.kernel = kernel
Exemplo n.º 4
0
 def setUpClass(self):
     cfg = RZ_Config.generate_default()
     webapp = init_webapp(cfg, None)
     webapp.testing = True
     self.webapp = webapp
Exemplo n.º 5
0
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

#!/usr/bin/python

import cgitb
from flup.server.fcgi import WSGIServer
import os
import sys

from rz_kernel import RZ_Kernel
import rz_server

# sys.path.insert(0, '/srv/www/rhizi/rhizi.net/src-py')
# enable debugging
cgitb.enable()

if __name__ == '__main__':

    cfg = rz_server.init_config(cfg_dir='/etc/rhizi')
    log = rz_server.init_log(cfg)

    kernel = RZ_Kernel()
    webapp = rz_server.init_webapp(cfg, kernel)
    ws_srv = rz_server.init_ws_interface(cfg, kernel, webapp)

    log.info('launching webapp via flup.server.fcgi.WSGIServer')

    WSGIServer(ws_srv).run()
Exemplo n.º 6
0
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.


#!/usr/bin/python

import cgitb
from flup.server.fcgi import WSGIServer
import os
import sys

from rz_kernel import RZ_Kernel
import rz_server


# sys.path.insert(0, '/srv/www/rhizi/rhizi.net/src-py')
# enable debugging
cgitb.enable()

if __name__ == '__main__':

    cfg = rz_server.init_config(cfg_dir='/etc/rhizi')
    log = rz_server.init_log(cfg)

    kernel = RZ_Kernel()
    webapp = rz_server.init_webapp(cfg, kernel)
    ws_srv = rz_server.init_ws_interface(cfg, kernel, webapp)

    log.info('launching webapp via flup.server.fcgi.WSGIServer')

    WSGIServer(ws_srv).run()