Skip to content

Commit 0265842

Browse files
authored
Merge pull request lightspeed-core#718 from tisnik/lcore-632-updated-source
LCORE-632: updated source doc
2 parents 65dc2f7 + 6a262c3 commit 0265842

4 files changed

Lines changed: 29 additions & 5 deletions

File tree

src/quota/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
## [__init__.py](__init__.py)
44
Quota management.
55

6+
## [cluster_quota_limiter.py](cluster_quota_limiter.py)
7+
Simple cluster quota limiter where quota is fixed for the whole cluster.
8+
9+
## [connect_pg.py](connect_pg.py)
10+
PostgreSQL connection handler.
11+
12+
## [connect_sqlite.py](connect_sqlite.py)
13+
SQLite connection handler.
14+
15+
## [quota_exceed_error.py](quota_exceed_error.py)
16+
Any exception that can occur when a user does not have enough tokens available.
17+
18+
## [quota_limiter.py](quota_limiter.py)
19+
Abstract class that is the parent for all quota limiter implementations.
20+
21+
## [quota_limiter_factory.py](quota_limiter_factory.py)
22+
Quota limiter factory class.
23+
24+
## [revokable_quota_limiter.py](revokable_quota_limiter.py)
25+
Simple quota limiter where quota can be revoked.
26+
627
## [sql.py](sql.py)
728
SQL commands used by quota management package.
829

30+
## [user_quota_limiter.py](user_quota_limiter.py)
31+
Simple user quota limiter where each user has a fixed quota.
32+

src/quota/quota_exceed_error.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
"""Any exception that can occur when user does not have enough tokens available."""
1+
"""Any exception that can occur when a user does not have enough tokens available."""
22

3-
# pylint: disable=line-too-long)
3+
# pylint: disable=line-too-long
44

55

66
class QuotaExceedError(Exception):
7-
"""Any exception that can occur when user does not have enough tokens available."""
7+
"""Any exception that can occur when a user does not have enough tokens available."""
88

99
def __init__(
1010
self, subject_id: str, subject_type: str, available: int, needed: int = 0

src/quota/quota_limiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Abstract class that is parent for all quota limiter implementations."""
1+
"""Abstract class that is the parent for all quota limiter implementations."""
22

33
from abc import ABC, abstractmethod
44

src/quota/user_quota_limiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Simple user quota limiter where each user have fixed quota."""
1+
"""Simple user quota limiter where each user has a fixed quota."""
22

33
from models.config import QuotaHandlersConfiguration
44
from log import get_logger

0 commit comments

Comments
 (0)