Add privilegedExecution flag to database and Poseidon Strategy

This commit is contained in:
Sebastian Serth
2022-09-24 00:05:03 +02:00
committed by Sebastian Serth
parent dffeca27de
commit eb188dcd71
13 changed files with 51 additions and 10 deletions

View File

@ -245,7 +245,11 @@ class Runner::Strategy::Poseidon < Runner::Strategy
def execute_command(command)
url = "#{runner_url}/execute"
body = {command: command, timeLimit: @execution_environment.permitted_execution_time}
body = {
command: command,
timeLimit: @execution_environment.permitted_execution_time,
privilegedExecution: @execution_environment.privileged_execution,
}
Rails.logger.debug { "#{Time.zone.now.getutc.inspect}: Preparing command execution at #{url}: #{command}" }
response = self.class.http_connection.post url, body.to_json