Skip to content

Commit

Permalink
debugging log stmts only
Browse files Browse the repository at this point in the history
  • Loading branch information
pbugni committed Apr 22, 2024
1 parent f020f24 commit 1055405
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions portal/trigger_states/empro_states.py
Expand Up @@ -275,9 +275,12 @@ def delay_processing(ts):

# check time since row transitioned to current state. delay
# till threshold reached
current_app.logger.debug(f"QQQ{ts.user_id} row timestamp: {ts.timestamp} now: {datetime.utcnow()}")
assert((ts.timestamp + timedelta(seconds=OPT_OUT_DELAY)).tzinfo == datetime.utcnow().tzinfo)
if ts.timestamp + timedelta(seconds=OPT_OUT_DELAY) < datetime.utcnow():
now = datetime.utcnow()
current_app.logger.debug(f"QQQ{ts.user_id} row timestamp: {ts.timestamp} now: {now}")
filed_n_delay = ts.timestamp + timedelta(seconds=OPT_OUT_DELAY)
current_app.logger.debug(f"QQQ{ts.user_id} {filed_n_delay} < {now} : {filed_n_delay < now}")
current_app.logger.debug(f"QQQ{ts.user_id} {filed_n_delay.tzinfo}")
if filed_n_delay < now:
current_app.logger.debug(f"QQQ{ts.user_id} return True from delay_processing")
return True
current_app.logger.debug(f"QQQ{ts.user_id} return None from delay_processing")
Expand Down

0 comments on commit 1055405

Please sign in to comment.