@@ -285,6 +285,8 @@ def qualified_bucket_name(self,
285
285
286
286
storage_term = 'storage'
287
287
288
+ mirror_term = 'datamirror'
289
+
288
290
current = Sentinel ()
289
291
290
292
def alb_access_log_path_prefix (self ,
@@ -1323,6 +1325,9 @@ def contribution_lambda_timeout(self, *, retry: bool) -> int:
1323
1325
def aggregation_lambda_timeout (self , * , retry : bool ) -> int :
1324
1326
return (10 if retry else 1 ) * 60
1325
1327
1328
+ def mirror_lambda_timeout (self ) -> int :
1329
+ return 15
1330
+
1326
1331
service_lambda_timeout = 15 * 60
1327
1332
1328
1333
api_gateway_timeout = 29
@@ -1494,16 +1499,22 @@ def derive(self, *, retry: bool = False, fail: bool = False) -> Self:
1494
1499
1495
1500
notifications_queue = Queue ('notifications' )
1496
1501
tallies_queue = Queue ('tallies' , fifo = True )
1502
+ mirror_queue = Queue ('mirror' , fifo = True )
1497
1503
1498
1504
@property
1499
1505
def all_queue_names (self ) -> list [str ]:
1500
- return self .indexer_queue_names + self .fail_queue_names
1506
+ return [
1507
+ * self .indexer_queue_names ,
1508
+ * self .fail_queue_names ,
1509
+ * ([self .mirror_queue .name ] if self .enable_mirroring else []),
1510
+ ]
1501
1511
1502
1512
@property
1503
1513
def fail_queue_names (self ) -> list [str ]:
1504
1514
return [
1505
1515
self .tallies_queue .to_fail .name ,
1506
1516
self .notifications_queue .to_fail .name ,
1517
+ * ([self .mirror_queue .to_fail .name ] if self .enable_mirroring else []),
1507
1518
]
1508
1519
1509
1520
@property
@@ -1747,6 +1758,10 @@ def vpn_subnet(self) -> str:
1747
1758
def it_flags (self ) -> set [str ]:
1748
1759
return set (self .environ .get ('azul_it_flags' , '' ).split ())
1749
1760
1761
+ @property
1762
+ def enable_mirroring (self ) -> bool :
1763
+ return self ._boolean (self .environ ['AZUL_MIRRORING_ENABLED' ])
1764
+
1750
1765
1751
1766
config : Config = Config () # yes, the type hint does help PyCharm
1752
1767
0 commit comments