crossbar.io python 应用程序组件,顶级配置中的未知属性'processes'



我正在尝试/学习使用Autobahn/Python的crossbar.io。我可以创建一些小组件来编写文件,运行shell命令,现在我按照以下描述进行操作。我在.crossbar/config.json中有来自Router with Application Sessionconfig示例。

不幸的是,我得到了这个:

[root@devtest 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相结合。

我将感谢任何帮助。

谢谢。

深入研究Crossbar.io的配置,我发现,我不能简单地从上述描述中复制粘贴示例配置文件。

经过一些尝试和错误,我现在有了一个不错的路由器组件配置:

{
   "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"
            }   
         ]   
      }   
   ]   
}

最新更新