pytroll / trollflow2

Next generation Trollflow. Trollflow is for batch-processing satellite data using Satpy
https://trollflow2.readthedocs.org/
GNU General Public License v3.0
10 stars 15 forks source link

Make it possible to use `FilePublisher` without running a nameserver #108

Closed pnuu closed 3 years ago

pnuu commented 3 years ago

This is part of my slowly ongoing plan on using Trollflow2 in a container on operations. For our (FMI) use case it might be necessary to use direct port connections between different parts of the whole chain (Trollmoves Server -> Trollmoves Client -> segment gatherer -> Trollflow2 -> Georest -> Geoserver) without any of the steps using Posttroll nameserverss.

The default (below) usage will still require a Posttroll nameserver, and the publisher will default to use the one on `localhost'. By default the publish port is automatically selected

workers:
  - fun: !!python/object:trollflow2.plugins.FilePublisher {}

To use direct port communications without connecting to a nameserver:

workers:
  - fun: !!python/object:trollflow2.plugins.FilePublisher {port=40000, nameserver: null}

As with the default use, the messages will be published on the localhost in a port either given by the user or selected automatically by Posttroll, but with the feature added here the nameserver will not be needed if the port is known.

codecov[bot] commented 3 years ago

Codecov Report

Merging #108 (88c84f8) into main (ffc9ac8) will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   93.95%   94.02%   +0.06%     
==========================================
  Files           9        9              
  Lines        1804     1824      +20     
==========================================
+ Hits         1695     1715      +20     
  Misses        109      109              
Flag Coverage Δ
unittests 94.02% <100.00%> (+0.06%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
trollflow2/plugins/__init__.py 90.07% <100.00%> (+0.04%) :arrow_up:
trollflow2/tests/test_trollflow2.py 99.34% <100.00%> (+0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ffc9ac8...88c84f8. Read the comment docs.

ghost commented 3 years ago

Congratulations :tada:. DeepCode analyzed your code in 2.728 seconds and we found no issues. Enjoy a moment of no bugs :sunny:.

👉 View analysis in DeepCode’s Dashboard | Configure the bot