Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Remove unnecessary calls to mk_vumi_api()
Browse files Browse the repository at this point in the history
  • Loading branch information
JayH5 committed Jun 22, 2015
1 parent 16d4d69 commit 1dc4494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go/base/management/commands/go_manage_message_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ def _apply_command(self, func, dry_run=None):

def handle_command_rebuild(self, *args, **options):
def rebuild(batch_id):
self.mk_vumi_api().mdb.reconcile_cache(batch_id)
self.vumi_api.mdb.reconcile_cache(batch_id)

self._apply_command(rebuild)
4 changes: 2 additions & 2 deletions go/base/management/commands/go_send_app_worker_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Command(BaseGoCommand):
help = "Send a VumiApi command to an application worker"
args = "<worker-name> <command> key1=value1 key2=value2"

def handle(self, worker_name, command, *parameters, **config):
def handle_no_command(self, worker_name, command, *parameters, **config):
handler = getattr(self, 'handle_%s' % (command,), None)
if handler is None:
raise CommandError('Unknown command %s' % (command,))
Expand All @@ -24,7 +24,7 @@ def handle(self, worker_name, command, *parameters, **config):
args.append(parameter)

cmd = handler(worker_name, command, *args, **kwargs)
self.mk_vumi_api().mapi.send_command(cmd)
self.vumi_api.mapi.send_command(cmd)

def handle_reconcile_cache(self, worker_name, command, account_key,
conversation_key):
Expand Down

0 comments on commit 1dc4494

Please sign in to comment.