A tool for parsing traffic on the jetstream and applying a moderation workstream based on regexp based rules

Added redis caching to prevent label duplication #1

merged
opened by skywatch.blue targeting main from fix-label-duplication

This commit introduces Redis caching to prevent redundant moderation actions, reducing the load on the Bluesky API.

Added the redis package as a dependency.

  • Implemented connectRedis and disconnectRedis functions to manage the Redis connection.
  • Added tryClaimPostLabel, tryClaimAccountLabel, and tryClaimAccountComment functions to manage and claim resources for caching purposes.
  • Modified src/config.ts to include the REDIS_URL environment variable.
  • Added src/redis.ts which contains the Redis client and connection management.
  • Integrated the caching logic into moderation functions to ensure that actions are performed only once per resource.
  • Added Redis healthcheck to compose.yaml.
  • Updated package.json and bun.lock.
0
by skywatch.blue 0 comments
expand 1 commit
feat: Add Redis caching and connection
pull request successfully merged
sign up or login to add to the discussion
Labels

None yet.

assignee
scoiattolo.mountainherder.xyz
Participants 1
AT URI
at://did:plc:e4elbtctnfqocyfcml6h2lf7/sh.tangled.repo.pull/3m3lpyh73ol22