-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathcounters.py
31 lines (22 loc) · 961 Bytes
/
counters.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
This module defines the various counters used by the core API.
"""
# counter for requests enqueued
QUEUE_COUNTER = "queue_counter"
# counter for number currently being served
SERVING_COUNTER = "serving_counter"
# counter for tokens generated
# Bandit B105: not a hardcoded password
TOKEN_COUNTER = "token_counter" # nosec
# counter for number of expired queue positions
EXPIRED_QUEUE_COUNTER = "expired_queue_counter"
# counter for sessions completed (i.e. token was used to complete transaction)
COMPLETED_SESSION_COUNTER = "completed_counter"
# counter for sessions abandoned (i.e. token was never used to complete transaction)
ABANDONED_SESSION_COUNTER = "abandoned_counter"
# maximum expired queue position
MAX_QUEUE_POSITION_EXPIRED = "max_queue_position_expired"
# indicate if reset in progress
RESET_IN_PROGRESS = "reset_in_progress"