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

Version Path
flok-0.0.105 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.103 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.102 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.101 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.100 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.99 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.98 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.97 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.96 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.95 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.94 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.93 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.92 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.91 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.90 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.89 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.88 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.87 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.86 spec/kern/assets/vm/pg_sockio/write2.rb
flok-0.0.85 spec/kern/assets/vm/pg_sockio/write2.rb