Skip to content

feat: redis for logic system's state #98

@LeonardoVieira1630

Description

@LeonardoVieira1630

Problem

The logic system stores trigger states in memory. When the system restarts, we lose this state and have two bad options:

  1. Variables reset to now() and we miss notifications that should have been sent
  2. We fetch all proposals via API and send everything to the queue, making the dispatcher process and discard duplicates

Both approaches suck. We either lose data or create unnecessary overhead.

Solution

Use Redis to persist trigger states instead of keeping them in memory. This way when the system restarts, we don't lose the endTimestamp from proposal finished triggers or any other state data.

What needs to be done

Add Redis to the logic system and update the triggers to store/retrieve state from Redis instead of memory variables. The proposal finished trigger currently stores endTimestamp - this should go to Redis.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions