From 78e48e65bdea126ea00ff739dbec1bb8e4240e69 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 14 Jan 2016 17:55:15 +0530 Subject: [PATCH] remove unused pushChanges --- oml/changelog.py | 4 ---- oml/node/nodeapi.py | 22 ---------------------- oml/node/server.py | 1 - oml/nodes.py | 10 ---------- 4 files changed, 37 deletions(-) diff --git a/oml/changelog.py b/oml/changelog.py index 05f10a1..eb763f7 100644 --- a/oml/changelog.py +++ b/oml/changelog.py @@ -58,8 +58,6 @@ class Changelog(db.Model): _data = _data.encode() state.db.session.add(c) state.db.session.commit() - #if state.nodes: - # state.nodes.queue('peered', 'pushChanges', [c.json()]) logger.debug('record change: %s', c.json()) @classmethod @@ -78,8 +76,6 @@ class Changelog(db.Model): _data = _data.encode() state.db.session.add(c) state.db.session.commit() - #if state.nodes: - # state.nodes.queue('peered', 'pushChanges', [c.json()]) logger.debug('record change: %s', c.json()) @classmethod diff --git a/oml/node/nodeapi.py b/oml/node/nodeapi.py index e5be9f8..d24fbae 100644 --- a/oml/node/nodeapi.py +++ b/oml/node/nodeapi.py @@ -5,7 +5,6 @@ from changelog import Changelog from user.models import User from websocket import trigger_event -import settings import state import logging @@ -24,27 +23,6 @@ def api_pullChanges(remote_id, user_id=None, from_=None, to=None): if user_id: return [] return Changelog.aggregated_changes(from_) - ''' - if not user_id: - user_id = settings.USER_ID - qs = Changelog.query.filter_by(user_id=user_id) - if from_: - qs = qs.filter(Changelog.revision>=from_) - if to: - qs = qs.filter(Changelog.revision