INNER CODE UNIT · Python
inventory_ntfy_inbox
yohey-w/multi-agent-shogun · scripts/slim_yaml.py:148
def inventory_ntfy_inbox(dry_run=False):
"""Report old ntfy entries without deleting or changing them."""
queue_dir = get_queue_dir()
ntfy_file = queue_dir / 'ntfy_inbox.yaml'
if not ntfy_file.exists():
return True
data = load_yaml(ntfy_file)
entries = data.get('inbox', []) if isinstance(data, dict) else []
if not isinstance(entries, list):
print("Error: ntfy inbox is not a list", file=sys.stderr)
return False
old_pending = []
old_terminal = []
for item in entries:
if not isinstance(item, dict):
continue