poal_feed/state.py
2021-05-16 13:00:45 -04:00

13 lines
299 B
Python

from hexlib.db import VolatileBooleanState
class PoalState:
def __init__(self, prefix):
self._state = VolatileBooleanState(prefix, sep=".")
def mark_visited(self, pid):
self._state["pid"][pid] = True
def has_visited(self, pid):
return self._state["pid"][pid]