Hi Scott,
> I have an ApplicationSession container like the following, and I'm
> wondering if there is any way to run some code before the class is
> constructed, which would be run with the configured "pythonpath". I'd
Yes. In fact, Crossbar.io will be happy with anything "callable" instead
of class that takes a ComponentConfig and returns an object that derives
of ApplicationSession:
class _VisualizerServer(ApplicationSession):
...
def makeSession(config):
## tweak class _VisualizerServer here ..
session = _VisualizerServer(config)
return session
and then
"classname": "paraview.web.pv_web_visualizer._makeSession",
Does that do what you want?
Note: because of this option, "classname" is properly illnamed ..
Cheers,
/Tobias
PS: In case you really want to know how it's done, here are the relevant
code pointers for creating sessions running side-by-side in a router:
https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/worker/router.py#L470
https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/worker/router.py#L513
and here is similar for containers:
https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/worker/container.py#L186
https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/worker/container.py#L243
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autobahnws+...@googlegroups.com
> <mailto:
autobahnws+...@googlegroups.com>.
> To post to this group, send email to
autob...@googlegroups.com
> <mailto:
autob...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/autobahnws/af87a47f-de12-43ed-8f6c-c7ae2c1d9410%40googlegroups.com
> <
https://groups.google.com/d/msgid/autobahnws/af87a47f-de12-43ed-8f6c-c7ae2c1d9410%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.