orca.tasks.fortests

Test and debugging tasks for Celery verification.

Contains simple Celery tasks for testing worker functionality, task routing, and basic operations. These are not used in production pipelines.

Functions

add(→ int)

Simple addition task for testing Celery connectivity.

str_concat(→ str)

String concatenation task for testing.

pcp(source, target_dir)

Copy a file to a target directory.

pcp_tree(source, target_dir)

Copy a directory tree to a target location.

read_ms(ms, lock)

Test reading a measurement set.

test_multiprocessing()

Test billiard multiprocessing in Celery workers.

do_sum(args)

Sum a sequence of numbers.

Module Contents

orca.tasks.fortests.add(x: int, y: int) int[source]

Simple addition task for testing Celery connectivity.

Parameters:
  • x – First integer.

  • y – Second integer.

Returns:

Sum of x and y.

orca.tasks.fortests.str_concat(first: str, second: str, third: str = '') str[source]

String concatenation task for testing.

Parameters:
  • first – First string.

  • second – Second string.

  • third – Optional third string.

Returns:

Concatenated string.

orca.tasks.fortests.pcp(source: str, target_dir: str)[source]

Copy a file to a target directory.

Parameters:
  • source – Source file path.

  • target_dir – Target directory path.

orca.tasks.fortests.pcp_tree(source: str, target_dir: str)[source]

Copy a directory tree to a target location.

Parameters:
  • source – Source directory path.

  • target_dir – Target parent directory.

orca.tasks.fortests.read_ms(ms: str, lock: bool)[source]

Test reading a measurement set.

Parameters:
  • ms – Path to measurement set.

  • lock – If True, open read-only.

orca.tasks.fortests.test_multiprocessing()[source]

Test billiard multiprocessing in Celery workers.

orca.tasks.fortests.do_sum(args)[source]

Sum a sequence of numbers.

Parameters:

args – Iterable of numbers.

Returns:

Sum of the numbers.