Conversation
tofu-rocketry
left a comment
There was a problem hiding this comment.
Promising, but you've overcomplicated things by not using dirq.
| # # If apel-lib is NOT installed then you can install it from https://github.com/apel/apel/releases | ||
|
|
||
| # Installation examples: |
There was a problem hiding this comment.
| # # 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.
| 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" |
There was a problem hiding this comment.
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.""" |
There was a problem hiding this comment.
This isn't quite what this function does. Be more specific.
| # 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 |
| 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): |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
See dirq comment. No need to reinvent the wheel.
Resolves GT-1223