8000 remove conditional loading · localstack/localstack@533d9dd · GitHub
[go: up one dir, main page]

Skip to content

Commit 533d9dd

Browse files
committed
remove conditional loading
1 parent 4df164b commit 533d9dd

File tree

1 file changed

+4
-1
lines changed
  • localstack-core/localstack/utils/analytics

1 file changed

+4
-1
lines changed

localstack-core/localstack/utils/analytics/usage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,14 @@ def aggregate() -> dict:
112112
return aggregated_payload
113113

114114

115-
@hooks.on_infra_shutdown(should_load=lambda: not config.DISABLE_EVENTS)
115+
@hooks.on_infra_shutdown()
116116
def aggregate_and_send():
117117
"""
118118
Aggregates data from all registered usage trackers and immediately sends the aggregated result to the analytics service.
119119
"""
120+
if not config.DISABLE_EVENTS:
121+
return
122+
120123
metadata = EventMetadata(
121124
session_id=get_session_id(),
122125
client_time=str(datetime.datetime.now()),

0 commit comments

Comments
 (0)
0