InboundDedupeStore (dedupe_store.py)

deer-flow · database, webhook-dedupe, deduplication, in-memory-store, storage

Inbound webhook dedupe store. The manager-level inbound dedupe (``ChannelManager._inbound_dedupe_key``) guards an agent run / final answer against provider redeliveries. The default store is an in-process ``OrderedDict`` (backward compatible, single-pod). A shared store (e.g. Pos

# Source: https://github.com/bytedance/deer-flow | License: MIT | Copyright 2025 Bytedance Ltd. and/or its affiliates
# Provided via justclaw.it.com; keep this notice with the code.
"""Inbound webhook dedupe store.

The manager-level inbound dedupe (``ChannelManager._inbound_dedupe_key``) guards an
agent run / final answer against provider redeliveries. The default store is an
in-process ``OrderedDict`` (backward compatible, single-pod). A shared store (e.g.
Postgres) can be injected for multi-pod deployments so a redelivery landing on a
different pod is still dropped as a duplicate. See issue #4120.
"""

from __future__ import annotations

import logging
import os
import time
from collections import OrderedDict
from typing import Any, Protocol

from sqlalchemy import text

logger = loggin

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key