1. Brent Tubbs
  2. pmxbot

Commits

Jason R. Coombs  committed 9e670de

Adding a couple of routines I've been working on

  • Participants
  • Parent commits 9d01b4b
  • Branches default

Comments (0)

Files changed (2)

File routines/logs-context.py

View file
  • Ignore whitespace
+from pmxbot import logging
+mlog = logging.Logger.from_URI('mongodb://localhost')
+slog = logging.Logger.from_URI('sqlite:pmxbot.sqlite')
+for msg_pair in zip(mlog.all_messages(), slog.export_all()):
+	mmsg, smsg = msg_pair
+	if mmsg['message'] != smsg['message']: break
+

File routines/migrate-all.py

View file
  • Ignore whitespace
+from pmxbot import logging
+from pmxbot import util
+from pmxbot import rss
+from pmxbot import storage
+storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')