2013/1/10 Anand Kapre <[email protected]>: > Hello, Hi!
> I have setup a highly available NFS cluster with heartbeat and DRBD as the > central storage for my music library. This is mounted as /media/music on my > liquidsoap nodes. During a simulated error (I turn off one of the machines), > I realized that liquidsoap hangs in the time it takes for the servers to > switch over. After much research, I have come to the conclusion (from this > post: http://en.usenet.digipedia.org/thread/11102/1564/) that I need to use > the add_protocol function to temporarily copy the music file from the NFS > server as a local file. Could someone please explain how to perform this > action as googling around has not led me to much documentation (I have > checked the liquidsoap site, the API documentation as well as the script > examples.) I think it should be something on those lines: # Not using timeout parameter for now.. def nfs_proto(file, timeout) = # A script that copies the file and returns # a temporary uri. i.e.: # nfs_cp foo.mp3 --> /tmp/foo-aef2bd.mp3 get_process_lines("/path/to/nfs_cp #{file}") end # Now we add the protocol add_protocol(temporary=true, "nfs", nfs_proto) Finally, in order to use it, you will need to prefix all your uris with nfs:. For instance: s = single("nfs:/path/to/foo.mp3") s = playlist(prefix="nfs:", ....) etc.. Hope this helps; I have not tested the code above but I believe it should be correct, save for stoopid typos :-) Romain ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
