Commit d39d993b authored by Svetlana Tkachenko's avatar Svetlana Tkachenko
Browse files

Add rss-check-feeds command to check feeds by request

parent fef5f1ef
1
2
3
https://twistedmatrix.com/trac/browser/trunk/twisted
http://docs.python.org/3/library/unittest.html
https://python-guide.readthedocs.org/en/latest/writing/tests.html
......@@ -34,7 +34,7 @@ class Rss(object):
# Variables.
self.server = server
self.network = self.server.config["network"]
self.commands = ["rss-add", "rss-del", "rss-list"]
self.commands = ["rss-add", "rss-del", "rss-list", "rss-check-feeds"]
self.loop = True
self.server.handle("command", self.handle_command, self.commands)
self.network = self.server.config["network"]
......@@ -91,6 +91,8 @@ class Rss(object):
connection.commit()
except sqlite3.Error as e:
self.server.doMessage(channel, "Error: %s RSS feed not removed (%s)" % (args[0], e.args[0]))
elif cmd == 'rss-check-feeds':
self.checkFeeds()
cursor.close()
connection.close()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment