Skip to content

Initial commit for apel router#11

Open
Sae126V wants to merge 1 commit intoapel:mainfrom
Sae126V:apel-router-script-v1
Open

Initial commit for apel router#11
Sae126V wants to merge 1 commit intoapel:mainfrom
Sae126V:apel-router-script-v1

Conversation

@Sae126V
Copy link
Member

@Sae126V Sae126V commented Dec 10, 2025

Resolves GT-1223

@tofu-rocketry tofu-rocketry self-assigned this Jan 22, 2026
@tofu-rocketry tofu-rocketry self-requested a review January 22, 2026 16:25
@tofu-rocketry tofu-rocketry added the enhancement New feature or request label Jan 22, 2026
Copy link
Member

@tofu-rocketry tofu-rocketry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promising, but you've overcomplicated things by not using dirq.

Comment on lines +19 to +21
# # If apel-lib is NOT installed then you can install it from https://github.com/apel/apel/releases

# Installation examples:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# # If apel-lib is NOT installed then you can install it from https://github.com/apel/apel/releases
# Installation examples:
# # If apel-lib is NOT installed then you can install it from https://github.com/apel/apel/releases
# Installation examples:

Remove the space to make it clear these comments are related.

Comment on lines +53 to +55
ACCELERATOR_MSG_TYPE = "APEL-accelerator-message: 0.1"
ACCELERATOR_SUMMARY_MSG_TYPE = "APEL-accelerator-summary-message: 0.1"
IP_RECORDS = "APEL Public IP message: 0.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the version numbers defined in this string, when the JSON has it as a separate field? We don't want to have to update the version number everywhere if it changes. For routing, we only care about the type of record, not the version.



def normalize_version(v):
"""Returns the version string exactly as is."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite what this function does. Be more specific.

Comment on lines +14 to +17
# Define reusable path aliases (anchors) here for consistency across the file.
# you are allowed to add more paths
paths:
grid_path: &GRID /var/spool/apel/grid/incoming
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain the syntax used.

log.error("Filesystem: Failed to remove source message %s/%s: %s", partition, msg_id, rm_exc)


def atomic_move_message(source_dir, destination_queue_path, partition, msg_id):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't you using dirq like APEL and SSM? It's designed to do this kind of thing, and it would be the safest way to interact with these queues.

I think this is the main item to address as it would simplify a lot of the code.

raise ValueError("Unconfigured APEL format message type: %s" % first_line)


def move_to_reject_queue(msg_dir, reject_root, partition, msg_id, log):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See dirq comment. No need to reinvent the wheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants