Sha256: b1084568bacb6492819699e8843171d05039fa0b6f84ed00b5ac26f73a8ea3b4
Contents?: true
Size: 979 Bytes
Versions: 30
Compression:
Stored size: 979 Bytes
Contents
controller :my_controller do services :vm on_entry %{ read_res_params = []; ///////////////////////////////////////////////////////////////////////// //Create a page and commit it to the sockio cache (cheating) //This way we know a commit should be performed when a write goes through ///////////////////////////////////////////////////////////////////////// var page = vm_create_page("test"); page.entries.push( {"_id": "test", "_sig": "test", "val": "test"} ); vm_reindex_page(page); vm_rehash_page(page); vm_cache["sockio"]["test"] = page; ///////////////////////////////////////////////////////////////////////// } action :my_action do on_entry %{ var page = vm_create_page("test"); var info = { ns: "sockio", page: page, }; Request("vm", "write", info); } on "read_res", %{ read_res_params.push(JSON.parse(JSON.stringify(params))); } end end
Version data entries
30 entries across 30 versions & 1 rubygems