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

Issue37 - Have a working flow test for AM #43

Merged
merged 11 commits into from
Jun 5, 2024
Merged
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
9 changes: 9 additions & 0 deletions am_flow/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.httpdocroot
.upstreamhttpserverpid
.httpserverpid
.ftpserverpid
.flowpostpid
flow_save/
__pycache__/
on_*.py
^sender/
35 changes: 35 additions & 0 deletions am_flow/config/flow/amserver-flow_f01.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#------------------ PREREQUISITES
callback_prepend gather.am
# Add AHL headers to filename
# callback rename.raw2bulletin
callback post.message

#------------------ DESTINATION
directory ${TESTDOCROOT}/bulletins_to_send/${YYYYMMDD}/${T1}${T2}/${CCCC}/${GG}
# We want to locally download the files
download on
# directory /datalocal/am/bulletins/
destination am://${FLOWBROKER}:5005

post_topicPrefix v03.post
post_broker ${MQP}://tfeed@${FLOWBROKER}
post_exchange xpublic
post_baseUrl file://sarra@${FLOWBROKER}/
post_base_dir ${TESTDOCROOT}

# ----------------- FILTERING
accept .*

# ----------------- OPTIONS
mirror False
sum sha512
# Some bulletins have iso-8859-1 encoded characters that UTF-8 can't resolve.
inputCharset iso-8859-1

#------------------ LOGGING
debug on
# logLevel debug
# messageDebugDump on

#------------------ INCLUDES
include stations.inc
221 changes: 221 additions & 0 deletions am_flow/config/flow/stations.inc

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions am_flow/config/sarra/get_from-watch_f02.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# source

instances 1

# broker is localhost and all products are processed locally

topic_prefix v03.post
broker ${MQP}://tfeed@${FLOWBROKER}/
exchange xs_tfeed_am

# listen to spread the poll messages

prefetch 10

# Does not work ATM (2024/01/05). Waiting for R3.00.51 of sr3 to come out
#sourceFromExchange True

# what to do with product

mirror True
timeCopy False
delete False

# extension -> moved to ~/master/sarra/poll/airnow_ab.conf
# header sundew_extension=AQ_MST:AB:AIRNOW:AQCSV:

# plugin to make the products with unique names

# RS ACDC 21955
permCopy False
permDefault 664

# directories

directory ${TESTDOCROOT}/bulletins_to_download/${YYYYMMDD}

# These bulletins are too long for AM to handle transferring
reject .*FP/.*
# Problematic canadian and american bulletins
reject .*SACN[34].*
reject .*KWAL.*
accept .*
acceptUnmatched False

# destination

post_broker ${MQP}://tsource@${FLOWBROKER}/
post_exchange xs_tsource_am
post_baseUrl file://home/home/sarra/sarra_devdocroot/bulletins_to_download
post_baseDir /

logLevel debug
12 changes: 12 additions & 0 deletions am_flow/config/sender/am_send_f04.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
topic_prefix v03.post

callback gather.message
callback send.am
broker ${MQP}://tsource@${FLOWBROKER}
exchange xs_tsource_am
accept .*
sum sha512
MaxBulLen 32768

sendTo am://${FLOWBROKER}:5005
debug on
24 changes: 24 additions & 0 deletions am_flow/config/subscribe/bulletin_subscribe_f05.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# download localhost via xpublic exchange (uses http)
# data comes from amserver flow

broker ${MQP}://tsub@${FLOWBROKER}/
topic_prefix v03.post
exchange xpublic

# logReject
messageDebugDump on
logLevel debug

strip 1
directory ${TESTDOCROOT}/bulletins_subscribe/

msg_total_interval 0
plugin msg_total_save

file_total_interval 0
plugin file_total_save

mirror True

accept .*

25 changes: 25 additions & 0 deletions am_flow/config/watch/watch-dir_f03.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
post_topic_prefix v03.post

post_broker ${MQP}://tfeed@${FLOWBROKER}/
post_exchange xs_tfeed_am
post_baseUrl file://home/home/sarra/sarra_devdocroot/bulletins_to_post/bulletins
post_baseDir /


path ${TESTDOCROOT}/bulletins_to_post/

logLevel info


fileEvents create

#caching False
#recursive True

strip 5
reject .*tmp.*
accept .*

inflight 5

debug True
Binary file added am_flow/doc/single_flow.dia
Binary file not shown.
Loading