mirror of
https://github.com/simon987/poal_feed.git
synced 2025-04-03 16:03:03 +00:00
13 lines
299 B
Python
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]
|