Detection Process

File location:
  • Bundled implementation: source/server/python/process.py

  • Cluster implementation: cluster/daemon/python/process.py

process.process(info: INFO)

Process extracted files with detection information.

Parameters:

info (INFO) – File to be processed.

Returns:

If detection process exit on success.

Return type:

bool

process.make_env(info: INFO)

Generate a dictionary of environment variables based on request information.

Parameters:

info (INFO) – Detection request information.

Return type:

Dict[str, Any]

process.make_cwd(info: INFO)

Generate the working directory of detection information.

Parameters:

info (INFO) – Detection request information.

Returns:

Path to the working directory.

Return type:

str

process.init(info: INFO)

Run the initialisation commands of detection information.

Parameters:

info (INFO) – Detection request information.

Returns:

Exit code (const.EXIT_SUCCESS or const.EXIT_FAILURE).

Return type:

int

process.run(command: str | List[str], info: INFO, file: str = 'unknown')

Run command with provided settings.

Parameters:
  • command (Union[str, List[str]]) – Command to execute.

  • info (INFO) – Detection request information.

  • file (str) – Stem of output log file.

Returns:

Exit code (const.EXIT_SUCCESS or const.EXIT_FAILURE).

Return type:

int