def command(self): self._load_config() from ckan.lib.search import rebuild, check, show, clear if not self.args: # default to printing help print self.usage return cmd = self.args[0] if cmd == 'rebuild': if len(self.args) > 1: rebuild(self.args[1]) else: rebuild() elif cmd == 'check': check() elif cmd == 'show': if not len(self.args) == 2: import pdb; pdb.set_trace() self.args show(self.args[1]) elif cmd == 'clear': clear() else: print 'Command %s not recognized' % cmd
def command(self): self._load_config() from ckan.lib.search import rebuild, check, show, clear if not self.args: # default to printing help print self.usage return cmd = self.args[0] if cmd == 'rebuild': if len(self.args) > 1: rebuild(self.args[1]) else: rebuild() elif cmd == 'check': check() elif cmd == 'show': if not len(self.args) == 2: import pdb pdb.set_trace() self.args show(self.args[1]) elif cmd == 'clear': clear() else: print 'Command %s not recognized' % cmd
def command(self): self._load_config() from ckan.lib.search import rebuild, check, show if not self.args: # default to run cmd = 'rebuild' else: cmd = self.args[0] if cmd == 'rebuild': rebuild() elif cmd == 'check': check() elif cmd == 'show': if not len(self.args) == 2: import pdb; pdb.set_trace() self.args show(self.args[1]) else: print 'Command %s not recognized' % cmd
def check(): from ckan.lib.search import check check()