2014-09-23 44 views
0

我在尝试/学习crossbar.io与Autobahn/Python。我可以创建一些小组件来编写文件,运行shell命令,现在我正在关注this description。 我在.crossbar/config.json中有Router with Application Sessionconfig例子。crossbar.io python应用程序组件,顶级配置中的未知属性“进程”

不幸的是我得到这样的:

[[email protected] write_file]# /opt/pypy/buildout/venv/bin/crossbar check 
Checking local configuration file /opt/crossbar/write_file/.crossbar/config.json 

Error: encountered unknown attribute 'processes' in top-level configuration 

我不知道怎么的例子config一些工作config结合起来。

我会很感激任何帮助。

谢谢。

回答

0

深入研究Crossbar.io的configuration我想通了,我不能简单地复制粘贴示例配置文件从所述的描述。

一些试验和错误我现在有一个体面的路由器组件配置后:

{ 
 
    "controller": { 
 
    }, 
 
    "workers": [ 
 
     { 
 
     "type": "router", 
 
     "options": { 
 
      "pythonpath": [".."] 
 
     }, 
 
     "realms": [ 
 
      { 
 
       "name": "realm1", 
 
       "roles": [ 
 
        { 
 
        "name": "anonymous", 
 
        "permissions": [ 
 
         { 
 
          "uri": "*", 
 
          "publish": true, 
 
          "subscribe": true, 
 
          "call": true, 
 
          "register": true 
 
         } 
 
        ] 
 
        } 
 
       ] 
 
      } 
 
     ], 
 
     "transports": [ 
 
      { 
 
       "type": "web", 
 
       "endpoint": { 
 
        "type": "tcp", 
 
        "port": 8080 
 
       }, 
 
       "paths": { 
 
        "/": { 
 
        "type": "static", 
 
        "directory": ".." 
 
        }, 
 
        "ws": { 
 
        "type": "websocket" 
 
        } 
 
       } 
 
      } 
 
     ], 
 
     "components": [ 
 
      { 
 
       "type": "class", 
 
       "realm": "realm1", 
 
       "classname": "write_file.write_file.WriteFile" 
 
      } 
 
     ] 
 
     } 
 
    ] 
 
}

相关问题