Class: Course::Assessment::ProgrammingEvaluationService

Inherits:
Object
  • Object
show all
Defined in:
app/services/course/assessment/programming_evaluation_service.rb

Overview

Sets up a programming evaluation, queues it for execution by evaluators, then returns the results.

Defined Under Namespace

Classes: Error, Result, TimeLimitExceededError

Constant Summary collapse

DEFAULT_TIMEOUT =

The default timeout for the job to finish.

5.minutes
CPU_TIMEOUT =
Course::Assessment::Question::Programming::CPU_TIMEOUT
MEMORY_LIMIT =
Course::Assessment::Question::Programming::MEMORY_LIMIT
MEMORY_LIMIT_RATIO =

The ratio to multiply the memory limits from our evaluation to the container by.

1.megabyte / 1.kilobyte

Class Method Summary collapse

Class Method Details

.execute(language, memory_limit, time_limit, package, timeout = nil) ⇒ Result

Executes the provided package.

Raises:

  • (Timeout::Error)

    When the operation times out.


88
89
90
# File 'app/services/course/assessment/programming_evaluation_service.rb', line 88

def execute(language, memory_limit, time_limit, package, timeout = nil)
  new(language, memory_limit, time_limit, package, timeout).send(:execute)
end