Skip to content

Commit

Permalink
Move notifications max block diff to an env var (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanjunath committed Nov 1, 2020
1 parent 84d0617 commit 934aa6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions discovery-provider/default_config.ini
Expand Up @@ -10,6 +10,7 @@ peer_refresh_interval = 3000
identity_service_url = https://identityservice.test
user_metadata_service_url = ''
healthy_block_diff = 100
notifications_max_block_diff = 25

[flask]
debug = true
Expand Down
3 changes: 2 additions & 1 deletion discovery-provider/src/queries/notifications.py
Expand Up @@ -7,11 +7,12 @@
from src.queries.query_helpers import get_repost_counts, get_save_counts, get_follower_count_dict
from src.models import Block, Follow, Save, SaveType, Playlist, Track, Repost, RepostType, Remix
from src.utils.db_session import get_db_read_replica
from src.utils.config import shared_config

logger = logging.getLogger(__name__)
bp = Blueprint("notifications", __name__)

max_block_diff = 50
max_block_diff = int(shared_config["discprov"]["notifications_max_block_diff"])


# pylint: disable=R0911
Expand Down

0 comments on commit 934aa6d

Please sign in to comment.