Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional pub/sub possibilities #32

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions bin/aapp_dr_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,8 @@ def publish_level1(publisher, config, msg, filelist, station_name, environment):
log_config = args.log_config
verbose = args.verbose
nameservers = args.nameservers
if nameservers and 'false' in nameservers:
nameservers = False
publish_port = args.publish_port

if not os.path.isfile(config_filename):
Expand Down Expand Up @@ -793,9 +795,13 @@ def publish_level1(publisher, config, msg, filelist, station_name, environment):
LOG.debug('Subscribe: {services} {topics}'.format(services=services,
topics=aapp_config.get_parameter('subscribe_topics')))

with posttroll.subscriber.Subscribe(services,
aapp_config.get_parameter('subscribe_topics'),
True) as subscr:
with posttroll.subscriber.Subscribe(
services,
topics=aapp_config.get_parameter('subscribe_topics'),
addr_listener=True,
addresses=aapp_config.get('addresses', None),
nameserver=aapp_config.get('subscribe_nameserver', 'localhost'),
) as subscr:
with Publish('aapp_runner', port=publish_port,
nameservers=nameservers) as publisher:
while True:
Expand Down
1 change: 1 addition & 0 deletions continuous_integration/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- pytest-cov
- setuptools_scm
- pip
- git
- pip:
- trollsift
- posttroll
8 changes: 7 additions & 1 deletion examples/aapp-processing.yaml-template
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ aapp_static_configuration:
avhrr_file: hrpt.l1b
msu_file: msun.l1b

# Valid NOAA(POES)satellite names to process
# Valid NOAA (POES) satellite names to process
supported_noaa_satellites:
- NOAA-15
- NOAA-18
Expand Down Expand Up @@ -93,6 +93,12 @@ aapp_processes:
subscribe_topics:
- /XLBANDANTENNA/HRPT/L0
- /XLBANDANTENNA/METOP/L0
# Additional settings for subscriber to disable nameserver connection and use
# direct connections instead
# addresses:
# - tcp://first_address:12345
# - tcp://second_address:67891
# subscribe_nameserver: False

# Base dir of the TLE files for AAPP. Will override the (AAPP) environment variable DIR_DATA_TLE
tle_indir: /base/dir/under/which/aapp/expects/the/tle/files
Expand Down
Loading