agent.process.size_limits module

Enforces size limit rules.

class agent.process.size_limits.CheckPDFSize(submission_id, process_id=None)

Bases: agent.process.base.Process

When a PDF is compiled, check for oversize.

evaluate_size(size_bytes, trigger, emit)

Add or remove holds as appropriate.

Return type

int

get_size(previous, trigger, emit)

Get the size of the compilation from the compiler service.

Return type

int

handle_compiler_exception(exc)

Handle exceptions raised when calling the compiler service.

Return type

None

steps = [<function CheckPDFSize.get_size>, <function CheckPDFSize.evaluate_size>]
class agent.process.size_limits.CheckSubmissionSourceSize(submission_id, process_id=None)

Bases: agent.process.base.Process

When a new source package is attached, check for oversize source.

check(previous, trigger, emit)

Perform the source size check procedure.

Return type

None

steps = [<function CheckSubmissionSourceSize.check>]