开发者

How can I set ZeroMQ swap files location for pyzmq?

I am using django and pyzmq, also ZeroMQ PUB and SUB sockets with configured HWM (high watermark) and disk SWAP. ZeroM开发者_StackOverflow社区Q creates it's swap files (like zmq_10976_0.swap) inside the root directory of django site. Process which use ZeroMQ is created by django action so I assume that swap files are simply placed to the current directory. How can I tell it to put these files somewhere else? I don't want to change current directory for the whole process for that.


If you look in https://github.com/zeromq/zeromq2-2/blob/master/src/swap.cpp you can see that the filename does not specify a directory path, therefore it will go wherever the current directory is pointing to. It would be pretty easy to modify that and build your own zmq library using RPATH to bundle libzmq into the pyzmq module directory. You would then have your own local customized pyzmq package.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜