fix: fallback when there is sessionId
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 7s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 2m28s
Build Worker Base and Application Images / deploy-stack (push) Successful in 14s
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 7s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 2m28s
Build Worker Base and Application Images / deploy-stack (push) Successful in 14s
This commit is contained in:
parent
e92efdbe11
commit
354ed9ce3c
2 changed files with 88 additions and 30 deletions
|
@ -521,19 +521,23 @@ class TrackingPipelineIntegration:
|
|||
logger.warning(f"No pending processing data found for display {display_id} when setting session {session_id}")
|
||||
|
||||
# FALLBACK: Execute pipeline for POS-initiated sessions
|
||||
# Use stored subscription_id instead of creating fake one
|
||||
stored_subscription_id = self.display_to_subscription.get(display_id)
|
||||
if stored_subscription_id:
|
||||
logger.info(f"[FALLBACK] Triggering fallback pipeline for session {session_id} on display {display_id} with subscription {stored_subscription_id}")
|
||||
# Skip if session_id is None (no car present or car has left)
|
||||
if session_id is not None:
|
||||
# Use stored subscription_id instead of creating fake one
|
||||
stored_subscription_id = self.display_to_subscription.get(display_id)
|
||||
if stored_subscription_id:
|
||||
logger.info(f"[FALLBACK] Triggering fallback pipeline for session {session_id} on display {display_id} with subscription {stored_subscription_id}")
|
||||
|
||||
# Trigger the fallback pipeline asynchronously with real subscription_id
|
||||
asyncio.create_task(self._execute_fallback_pipeline(
|
||||
display_id=display_id,
|
||||
session_id=session_id,
|
||||
subscription_id=stored_subscription_id
|
||||
))
|
||||
# Trigger the fallback pipeline asynchronously with real subscription_id
|
||||
asyncio.create_task(self._execute_fallback_pipeline(
|
||||
display_id=display_id,
|
||||
session_id=session_id,
|
||||
subscription_id=stored_subscription_id
|
||||
))
|
||||
else:
|
||||
logger.error(f"[FALLBACK] No subscription_id stored for display {display_id}, cannot execute fallback pipeline")
|
||||
else:
|
||||
logger.error(f"[FALLBACK] No subscription_id stored for display {display_id}, cannot execute fallback pipeline")
|
||||
logger.debug(f"[FALLBACK] Skipping pipeline execution for session_id=None on display {display_id}")
|
||||
|
||||
def clear_session_id(self, session_id: str):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue