STABLE-ish: Use PStore instead of filesystem.
This commit is contained in:
parent
0f615f92d7
commit
caf580951e
|
@ -76,22 +76,19 @@ module Pigeon
|
|||
end
|
||||
|
||||
if @previous_message
|
||||
puts "~~ Previous message set to " + @previous_message.inspect
|
||||
return @previous_message
|
||||
end
|
||||
|
||||
if @depth == 1
|
||||
puts "~~ depth is 1!"
|
||||
return @previous_message = nil
|
||||
end
|
||||
|
||||
puts "~~ TADA!"
|
||||
path = path_to_message_number(@depth - 1)
|
||||
@previous_message = Marshal.load(File.read(path))
|
||||
end
|
||||
|
||||
def calculate_depth
|
||||
Dir[OUTBOX_PATH].count.tap { |x| "~~~ x is " + x.to_s }
|
||||
Dir[OUTBOX_PATH].count
|
||||
end
|
||||
|
||||
def message_id # I need this to calculate `prev`.
|
||||
|
|
Loading…
Reference in New Issue