Skip to content

95 refactor#119

Merged
tofu-rocketry merged 4 commits intoapel:devfrom
tofu-rocketry:95-refactor
Feb 10, 2020
Merged

95 refactor#119
tofu-rocketry merged 4 commits intoapel:devfrom
tofu-rocketry:95-refactor

Conversation

@tofu-rocketry
Copy link
Member

@tofu-rocketry tofu-rocketry commented Feb 6, 2020

This resolves #95 by addressing most of the items in the issue.

  • argo-ams-library has been made optional.
  • Duplicated code between AMS and STOMP methods has been factored out to _save_msg_to_queue.
  • AMS send message function has been factored out to _send_msg_ams.

It doesn't pull out AMS and STOMP functions to their own files, but that's a larger thing that is probably dependant on stomp.py being made optional (but it has a lot of low level integration in the code). Follow up issue in #120.

Factor out duplicated code between STOMP and AMS receiving/pulling
methods for saving the messages to disk (by adding them to a dirq
queue). Additionally this change ensures that messages, once pulled from
AMS are always acknowledged, whether they are written out successfully,
which mirrors the behavious of the STOMP method.
Set imports from argo_ams_libaray to None if the package isn't available
and raise an import error if AMS is then used.
- Make argo-ams-library optional in install files so SSM can be
installed without it.
- Tweak extras_require to use "feature" names for the keys.
@tofu-rocketry tofu-rocketry added this to the 3.0.0 milestone Feb 6, 2020
@tofu-rocketry tofu-rocketry requested a review from a team as a code owner February 6, 2020 15:15
@tofu-rocketry tofu-rocketry self-assigned this Feb 6, 2020
extras_require={
'python-daemon': ['python-daemon'],
'AMS': ['argo-ams-library'],
'daemon': ['python-daemon'],
Copy link
Member

Choose a reason for hiding this comment

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

Changing things?! I guess as this is milestone'd for 3.0.0 we can go crazy :p!

Copy link
Member Author

Choose a reason for hiding this comment

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

The dictionary key is meant to be the name of the optional "feature" of your software rather than just the name of the package.

@tofu-rocketry tofu-rocketry merged commit 6e97ffc into apel:dev Feb 10, 2020
@tofu-rocketry tofu-rocketry deleted the 95-refactor branch February 10, 2020 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

AMS support: optional modules and extra refactoring

2 participants