MAX_TIME_OPEN = 1
# idle timeout increment, one hour as a rational number of days.
+ # NOTE: DO NOT CHANGE THIS TO 1.hour! when this was done the idle
+ # timeout changed to 1 second, which meant all changesets closed
+ # almost immediately.
IDLE_TIMEOUT = Rational(1,24)
# Use a method like this, so that we can easily change how we
return ((closed_at > DateTime.now) and (num_changes <= MAX_ELEMENTS))
end
+ def set_closed_time_now
+ closed_at = DateTime.now
+ end
+
def self.from_xml(xml, create=false)
begin
p = XML::Parser.new
# can't change a closed changeset
unless is_open?
- raise OSM::APIChangesetAlreadyClosedError
+ raise OSM::APIChangesetAlreadyClosedError.new(self)
end
# copy the other's tags