Skip to content

Commit da9dd37

Browse files
committed
convert now adds inflight setting when sr3 default is different
1 parent 19f8a14 commit da9dd37

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

sarracenia/sr.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -2784,12 +2784,14 @@ def convert1(self,cfg):
27842784

27852785
synonyms = sarracenia.config.Config.synonyms
27862786
accept_all_seen=False
2787+
post_broker_seen=False
2788+
inflight_seen=False
27872789
acceptUnmatched_explicit=False
27882790
pos_args_present=False
27892791
with open(v3_config_path, 'w') as v3_cfg:
27902792
v3_cfg.write( f'# created by: sr3 convert {cfg}\n')
27912793
if component in [ 'shovel', 'winnow' ]:
2792-
v3_cfg.write('# topicCopy on is only there for bug-for-bug compat with v2. turn it off if you can.\n')
2794+
v3_cfg.write('# topicCopy on is only there for bug-for-bug compat with v2. Leave it off if you can.\n')
27932795
v3_cfg.write('#topicCopy on\n')
27942796

27952797
if component in [ 'sarra', 'sender', 'subscribe' ]:
@@ -2809,9 +2811,17 @@ def convert1(self,cfg):
28092811
k = line[0]
28102812
if k in synonyms:
28112813
k = synonyms[k]
2814+
if k in [ 'post_broker' ]:
2815+
post_broker_seen=True
2816+
if k in [ 'inflight' ]:
2817+
inflight_seen=True
28122818
if k in [ 'queueName' ]:
28132819
queueName=line[1]
28142820

2821+
if not inflight_seen and post_broker_seen and component in [ 'sarra', 'sender', 'subscribe' ]:
2822+
v3_cfg.write('#sr3 inflight defaults to None, v2 defaulted to .tmp when post_broker set.\n')
2823+
v3_cfg.write('inflight .tmp\n')
2824+
28152825
#2nd re-write pass.
28162826
subtopicFound=False
28172827
with open(v2_config_path, 'r') as v2_cfg:

0 commit comments

Comments
 (0)