5151 parse_strategy_plugin_mounts ,
5252)
5353from quant_platform_kit .notifications .events import NotificationPublisher , RenderedNotification
54- from quant_platform_kit .notifications .strategy_plugin_email import (
55- StrategyPluginEmailAlertMarkerStore ,
56- build_strategy_plugin_alert_context_label as build_email_alert_context_label ,
57- publish_strategy_plugin_email_alerts ,
54+ from quant_platform_kit .notifications .strategy_plugin_google_voice import (
55+ StrategyPluginGoogleVoiceAlertMarkerStore ,
56+ build_strategy_plugin_alert_context_label as build_google_voice_alert_context_label ,
57+ publish_strategy_plugin_google_voice_alerts ,
5858)
5959from quant_platform_kit .strategy_contracts import build_strategy_evaluation_inputs
6060from runtime_config_support import PlatformRuntimeSettings , load_platform_runtime_settings
@@ -212,7 +212,7 @@ def attach_strategy_plugin_result(
212212
213213
214214def build_strategy_plugin_alert_context_label (settings : PlatformRuntimeSettings ) -> str :
215- return build_email_alert_context_label (
215+ return build_google_voice_alert_context_label (
216216 platform_id = "firstrade" ,
217217 strategy_profile = settings .strategy_profile ,
218218 account_scope = settings .account_region or settings .account_prefix ,
@@ -231,7 +231,7 @@ def build_strategy_plugin_alert_store(
231231 state_bucket = env_reader ("FIRSTRADE_GCS_STATE_BUCKET" , None )
232232 state_prefix = env_reader ("FIRSTRADE_STATE_PREFIX" , "firstrade-platform" ) or "firstrade-platform"
233233 state_gcs_uri = f"gs://{ state_bucket } /{ state_prefix } " if state_bucket else None
234- return StrategyPluginEmailAlertMarkerStore (
234+ return StrategyPluginGoogleVoiceAlertMarkerStore (
235235 local_dir = env_reader ("STRATEGY_PLUGIN_ALERT_STATE_DIR" , None ) or "/tmp/quant_strategy_plugin_alerts" ,
236236 gcs_prefix_uri = explicit_gcs_uri or report_gcs_uri or state_gcs_uri ,
237237 gcp_project_id = settings .project_id ,
@@ -246,9 +246,9 @@ def publish_strategy_plugin_alerts(
246246 log_message : Callable [..., Any ] = print ,
247247 env_reader : Callable [[str , str | None ], str | None ] = os .getenv ,
248248):
249- return publish_strategy_plugin_email_alerts (
249+ return publish_strategy_plugin_google_voice_alerts (
250250 signals ,
251- email_settings = settings ,
251+ google_voice_settings = settings ,
252252 translator = translator ,
253253 strategy_label = settings .strategy_profile ,
254254 context_label = build_strategy_plugin_alert_context_label (settings ),
@@ -380,29 +380,29 @@ def run_strategy_cycle(
380380 }
381381 ],
382382 "action_done" : False ,
383- "strategy_plugin_alert_email_attempted_count " : 0 ,
384- "strategy_plugin_alert_email_sent_count " : 0 ,
385- "strategy_plugin_alert_email_skipped_count " : 0 ,
386- "strategy_plugin_alert_email_failed_count " : 0 ,
387- "strategy_plugin_alert_email_deliveries " : [],
383+ "strategy_plugin_alert_google_voice_attempted_count " : 0 ,
384+ "strategy_plugin_alert_google_voice_sent_count " : 0 ,
385+ "strategy_plugin_alert_google_voice_skipped_count " : 0 ,
386+ "strategy_plugin_alert_google_voice_failed_count " : 0 ,
387+ "strategy_plugin_alert_google_voice_deliveries " : [],
388388 }
389389 return attach_strategy_plugin_result (
390390 result ,
391391 signals = strategy_plugin_signals ,
392392 error = strategy_plugin_error ,
393393 translator = translator ,
394394 )
395- strategy_plugin_alert_email_result = None
396- strategy_plugin_alert_email_error = None
395+ strategy_plugin_alert_google_voice_result = None
396+ strategy_plugin_alert_google_voice_error = None
397397 try :
398- strategy_plugin_alert_email_result = publish_strategy_plugin_alerts (
398+ strategy_plugin_alert_google_voice_result = publish_strategy_plugin_alerts (
399399 strategy_plugin_signals ,
400400 settings = settings ,
401401 translator = translator ,
402402 env_reader = env_reader ,
403403 )
404404 except Exception as exc :
405- strategy_plugin_alert_email_error = f"{ type (exc ).__name__ } : { exc } "
405+ strategy_plugin_alert_google_voice_error = f"{ type (exc ).__name__ } : { exc } "
406406 strategy_run_persisted = False
407407 strategy_run_persistence_error = None
408408 if persist_strategy_runs :
@@ -479,20 +479,20 @@ def run_strategy_cycle(
479479 result ["funding_blocked" ] = True
480480 if strategy_run_persistence_error :
481481 result ["strategy_run_persistence_error" ] = strategy_run_persistence_error
482- if strategy_plugin_alert_email_result is not None :
483- result .update (strategy_plugin_alert_email_result .to_report_fields ())
482+ if strategy_plugin_alert_google_voice_result is not None :
483+ result .update (strategy_plugin_alert_google_voice_result .to_report_fields ())
484484 else :
485485 result .update (
486486 {
487- "strategy_plugin_alert_email_attempted_count " : 0 ,
488- "strategy_plugin_alert_email_sent_count " : 0 ,
489- "strategy_plugin_alert_email_skipped_count " : 0 ,
490- "strategy_plugin_alert_email_failed_count " : 0 ,
491- "strategy_plugin_alert_email_deliveries " : [],
487+ "strategy_plugin_alert_google_voice_attempted_count " : 0 ,
488+ "strategy_plugin_alert_google_voice_sent_count " : 0 ,
489+ "strategy_plugin_alert_google_voice_skipped_count " : 0 ,
490+ "strategy_plugin_alert_google_voice_failed_count " : 0 ,
491+ "strategy_plugin_alert_google_voice_deliveries " : [],
492492 }
493493 )
494- if strategy_plugin_alert_email_error :
495- result ["strategy_plugin_alert_email_error " ] = strategy_plugin_alert_email_error
494+ if strategy_plugin_alert_google_voice_error :
495+ result ["strategy_plugin_alert_google_voice_error " ] = strategy_plugin_alert_google_voice_error
496496 attach_strategy_plugin_result (
497497 result ,
498498 signals = strategy_plugin_signals ,
0 commit comments