Skip to content

Commit

Permalink
[#1256] Don't load the synchronous_search plugin on cli
Browse files Browse the repository at this point in the history
It is already loaded on startup
  • Loading branch information
amercader committed Oct 15, 2013
1 parent e6d2c45 commit f5d168c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ckan/lib/cli.py
Expand Up @@ -842,25 +842,21 @@ def show(self, dataset_ref):
pprint.pprint(dataset.as_dict())

def delete(self, dataset_ref):
from ckan import plugins
import ckan.model as model
dataset = self._get_dataset(dataset_ref)
old_state = dataset.state

plugins.load('synchronous_search')
rev = model.repo.new_revision()
dataset.delete()
model.repo.commit_and_remove()
dataset = self._get_dataset(dataset_ref)
print '%s %s -> %s' % (dataset.name, old_state, dataset.state)

def purge(self, dataset_ref):
from ckan import plugins
import ckan.model as model
dataset = self._get_dataset(dataset_ref)
name = dataset.name

plugins.load('synchronous_search')
rev = model.repo.new_revision()
dataset.purge()
model.repo.commit_and_remove()
Expand Down Expand Up @@ -1286,8 +1282,6 @@ class CreateTestDataCommand(CkanCommand):
def command(self):
self._load_config()
self._setup_app()
from ckan import plugins
plugins.load('synchronous_search') # so packages get indexed
from create_test_data import CreateTestData

if self.args:
Expand Down

0 comments on commit f5d168c

Please sign in to comment.