summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
85b3f7f)
should do a better job of controlling things.
# Help methods for checking boundary sanity and area size
include MapBoundary
# Help methods for checking boundary sanity and area size
include MapBoundary
- #COUNT is the number of map requests to allow before exiting and starting a new process
- @@count = COUNT
-
# The maximum area you're allowed to request, in square degrees
MAX_REQUEST_AREA = APP_CONFIG['max_request_area']
# The maximum area you're allowed to request, in square degrees
MAX_REQUEST_AREA = APP_CONFIG['max_request_area']
trkseg << point.to_xml_node()
end
trkseg << point.to_xml_node()
end
- #exit when we have too many requests
- if @@count > MAX_COUNT
- render :text => doc.to_s, :content_type => "text/xml"
- @@count = COUNT
- exit!
- end
-
response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
render :text => doc.to_s, :content_type => "text/xml"
response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
render :text => doc.to_s, :content_type => "text/xml"
response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
render :text => doc.to_s, :content_type => "text/xml"
response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
render :text => doc.to_s, :content_type => "text/xml"
-
- #exit when we have too many requests
- if @@count > MAX_COUNT
- @@count = COUNT
-
- exit!
- end
end
# Get a list of the tiles that have changed within a specified time
end
# Get a list of the tiles that have changed within a specified time
if Process.const_defined?(:RLIMIT_AS)
Process.setrlimit Process::RLIMIT_AS, 1024*1024*1024, Process::RLIM_INFINITY
end
if Process.const_defined?(:RLIMIT_AS)
Process.setrlimit Process::RLIMIT_AS, 1024*1024*1024, Process::RLIM_INFINITY
end
-
-# Force a restart after every 10000 requests
-COUNT = 0
-MAX_COUNT = 10000