added the ability to limit memory consumption of code submissions executed using Docker

This commit is contained in:
Hauke Klement
2015-03-17 11:35:25 +01:00
parent 640122fff2
commit b1218e0b80
12 changed files with 102 additions and 10 deletions

View File

@ -0,0 +1,11 @@
class AddMemoryLimitToExecutionEnvironments < ActiveRecord::Migration
def change
add_column :execution_environments, :memory_limit, :integer
reversible do |direction|
direction.up do
ExecutionEnvironment.update_all(memory_limit: DockerClient::DEFAULT_MEMORY_LIMIT)
end
end
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150310150712) do
ActiveRecord::Schema.define(version: 20150317083739) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -46,6 +46,7 @@ ActiveRecord::Schema.define(version: 20150310150712) do
t.string "user_type"
t.integer "pool_size"
t.integer "file_type_id"
t.integer "memory_limit"
end
create_table "exercises", force: true do |t|