Skip to content
Browse files

TODO

  • Loading branch information...
1 parent a898900 commit 7b23172ed7e9f23331786b120dbf8919051587eb @bmizerany bmizerany committed Feb 7, 2011
Showing with 3 additions and 30 deletions.
  1. +1 −24 TODO
  2. +2 −6 lib/fraggle/client.rb
View
25 TODO
@@ -1,24 +1 @@
-[I] CHECKIN = 0; # cas, id => cas
- [X] Fist pass impl
- [X] Better id gen
-[X] GET = 1; # path, id => cas, value
-[X] SET = 2; # cas, path, value => cas
-[X] DEL = 3; # cas, path => {}
-[?] ESET = 4; # cas, path => {}
-[X] SNAP = 5; # {} => seqn, id
-[X] DELSNAP = 6; # id => {}
-[X] NOOP = 7; # {} => {}
-[X] WATCH = 8; # path => {cas, path, value}+
-[X] CANCEL = 10; # id => {}
-[X] WALK = 9; # path, id => {cas, path, value}+
-[ ] SYNCPATH = 12; # path => cas, value
-
-[ ] # future
-[ ] GETDIR = 14; # path => {cas, value}+
-[ ] MONITOR = 11; # path => {cas, path, value}+
-
-[ ] # deprecated
-[ ] JOIN = 13;
-
-[X] Sugar for Fraggel::Response (i.e. dir? ...)
-[ ] Assoc request with response (store in cbx?)
+* Logging
View
8 lib/fraggle/client.rb
@@ -211,24 +211,21 @@ def cancelable(req)
end
def post_init
- p [:connected, @addr]
@last_received = Time.now
@addrs = {}
## Memoize the timer so we don't call it twice
@timer ||= EM.add_periodic_timer(2) do
if (n = Time.now - last_received) >= 3
- p [:timeout, n]
close_connection
else
- p [:ping]
- get(0, "/ping") { p :pong }
+ get(0, "/ping")
end
end
waw = Proc.new do |e|
get 0, "/doozer/info/#{e.value}/public-addr" do |a|
- p [:a, a]
+
next if a.value == "" || a.value == @addr
@addrs[e.path] = a.value
puts "Got addr: #{a.value}"
@@ -248,7 +245,6 @@ def unbind
raise "No more doozers!"
end
- p [:attempting, @addr]
host, port = @addr.split(":")
reconnect(host, port.to_i)
post_init

0 comments on commit 7b23172

Please sign in to comment.
Something went wrong with that request. Please try again.