Skip to content

Commit

Permalink
Merge pull request #177 from jounaidr/164-log-the-topic
Browse files Browse the repository at this point in the history
164 log the topic
  • Loading branch information
tofu-rocketry authored Aug 9, 2022
2 parents a5de3f0 + d9711a3 commit 0fb7c64
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apel-ssm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ BuildArch: noarch
BuildRequires: python-devel
%endif

Requires: stomppy < 5.0.0, python-ldap < 3.4.0, openssl
Requires: stomppy < 5.0.0, python-ldap < 3.4.0, python-setuptools, openssl
Requires(pre): shadow-utils

%define ssmconf %_sysconfdir/apel
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Base requirements for ssm

argo-ams-library
stomp.py<5.0.0
python-daemon<=2.3.0 # 2.3.1 dropped support for Python 2
python-ldap<3.4.0 # python-ldap-3.4.0 dropped support for Python 2
setuptools # Required for pkg_resources (also happens to be a dependency of python-ldap)

# Dependencies for optional dirq based sending
dirq

# Dependencies for experimental AMS functionality

argo-ams-library
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main():
download_url='https://github.com/apel/ssm/releases',
license='Apache License, Version 2.0',
install_requires=[
'stomp.py<5.0.0', 'python-ldap<3.4.0',
'stomp.py<5.0.0', 'python-ldap<3.4.0', 'setuptools',
],
extras_require={
'AMS': ['argo-ams-library'],
Expand Down
13 changes: 12 additions & 1 deletion ssm/ssm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"""
from __future__ import print_function

import pkg_resources

from ssm import crypto
from ssm.message_directory import MessageDirectory

Expand Down Expand Up @@ -549,7 +551,16 @@ def handle_connect(self):
connect to each in turn until successful.
"""
if self._protocol == Ssm2.AMS_MESSAGING:
log.debug('handle_connect called for AMS, doing nothing.')
log.info("Using AMS version %s",
pkg_resources.get_distribution('argo_ams_library').version)

log.info("Will connect to %s", self._brokers[0])

if self._dest is not None:
log.info('Will send messages to: %s', self._dest)

if self._listen is not None:
log.info('Will subscribe to: %s', self._listen)
return

log.info("Using stomp.py version %s.%s.%s.", *stomp.__version__)
Expand Down

0 comments on commit 0fb7c64

Please sign in to comment.