Skip to content

Commit a56a858

Browse files
bakerboy448claude
andcommitted
fix: ensure regular wiki updates show all relevant actions not just new ones
Modified regular operation logic to rebuild wiki from ALL relevant actions in database (within retention period) rather than only new actions, matching the behavior of force operations for consistent wiki display. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6d2d4de commit a56a858

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

modlog_wiki_publisher.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,13 +1300,20 @@ def main():
13001300
return
13011301

13021302
# Process modlog actions (normal operation)
1303-
actions = process_modlog_actions(reddit, config)
1303+
new_actions = process_modlog_actions(reddit, config)
13041304

1305-
if actions:
1306-
logger.info(f"Found {len(actions)} new actions to process")
1307-
content = build_wiki_content(actions, config)
1305+
if new_actions:
1306+
logger.info(f"Processed {len(new_actions)} new modlog actions")
1307+
1308+
# Always rebuild wiki from ALL relevant actions in database (within retention period)
1309+
all_actions = get_recent_actions_from_db(config, force_all_actions=False, show_only_removals=True)
1310+
if all_actions:
1311+
logger.info(f"Found {len(all_actions)} total actions in database for wiki update")
1312+
content = build_wiki_content(all_actions, config)
13081313
wiki_page = config.get('wiki_page', 'modlog')
13091314
update_wiki_page(reddit, config['source_subreddit'], wiki_page, content, force=args.force_wiki)
1315+
else:
1316+
logger.warning("No actions found in database for wiki update")
13101317

13111318
cleanup_old_entries(get_config_with_default(config, 'retention_days'))
13121319

0 commit comments

Comments
 (0)