Don't put MemoryLimit class in the OSM module as it breaks autoloading
This commit is contained in:
parent
5e2b8d087c
commit
723cb57e6d
1 changed files with 26 additions and 28 deletions
|
@ -7,7 +7,6 @@ end
|
|||
# configured then setup some rack middleware to police the limit
|
||||
if APP_CONFIG.include?('soft_memory_limit') and defined?(PhusionPassenger)
|
||||
# Define some rack middleware to police the soft memory limit
|
||||
module OSM
|
||||
class MemoryLimit
|
||||
def initialize(app)
|
||||
@app = app
|
||||
|
@ -37,8 +36,7 @@ if APP_CONFIG.include?('soft_memory_limit') and defined?(PhusionPassenger)
|
|||
return fields[1].to_i / 256
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Install the memory limit checker
|
||||
Rails.configuration.middleware.use OSM::MemoryLimit
|
||||
Rails.configuration.middleware.use MemoryLimit
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue