[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Wed Aug 17 14:46:29 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/c0f408ffa4bb/
changeset:   c0f408ffa4bb
branch:      feature-1275-solr-search
user:        John Glover
date:        2011-08-17 16:44:34
summary:     [test] solr test bug fix
affected #:  2 files (71 bytes)

--- a/ckan/tests/lib/test_solr_package_search.py	Wed Aug 17 15:07:22 2011 +0100
+++ b/ckan/tests/lib/test_solr_package_search.py	Wed Aug 17 15:44:34 2011 +0100
@@ -250,7 +250,6 @@
             assert expected_pkg in pkgs, '%s : %s' % (expected_pkg, result)
 
     def test_overall(self):
-        print 'test_overall'
         self._check_search_results('annakarenina', 1, ['annakarenina'])
         self._check_search_results('warandpeace', 1, ['warandpeace'])
         self._check_search_results('', 2)


--- a/ckan/tests/lib/test_solr_search_index.py	Wed Aug 17 15:07:22 2011 +0100
+++ b/ckan/tests/lib/test_solr_search_index.py	Wed Aug 17 15:44:34 2011 +0100
@@ -29,6 +29,7 @@
     """
     @classmethod
     def setup_class(cls):
+        config['search_backend'] = 'solr'
         CreateTestData.create()
         cls.solr = solr.SolrConnection(config.get('solr_url'))
         cls.fq = " +site_id:\"%s\" " % config.get('ckan.site_id')


http://bitbucket.org/okfn/ckan/changeset/ed4bd5e84eb7/
changeset:   ed4bd5e84eb7
branch:      feature-1275-solr-search
user:        John Glover
date:        2011-08-17 16:45:52
summary:     [solr] remove solr_worker, indexing worker code still exists (but commented out) in worker.py
affected #:  2 files (616 bytes)

--- a/ckan/lib/search/solr_worker.py	Wed Aug 17 15:44:34 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-__import__("pkg_resources").get_distribution("ckanext-queue>=0.1")
-
-from ckanext.queue.worker import Worker 
-from indexing import index_package, delete_package
-
-class SolrIndexingWorker(Worker):
-    
-    def consume(self, routing_key, operation, payload):
-        assert 'solr_url' in self.config
-        assert 'ckan.site_id' in self.config
-        
-        if routing_key == 'Package':
-            if operation in ['new', 'changed']:
-                index_package(payload, self.config) 
-            elif operation == 'deleted':
-                delete_package(payload, self.config) 
\ No newline at end of file


--- a/ckan/lib/search/worker.py	Wed Aug 17 15:44:34 2011 +0100
+++ b/ckan/lib/search/worker.py	Wed Aug 17 15:45:52 2011 +0100
@@ -4,7 +4,9 @@
 from ckan.model import DomainObjectOperation
 from ckan.plugins import SingletonPlugin, implements, IDomainObjectModification
 from ckan.lib.dictization.model_dictize import package_to_api1
-from common import SearchError
+# Needed for SolrIndexingWorker:
+# from ckanext.queue.worker import Worker 
+# from indexing import index_package, delete_package
 
 log = logging.getLogger(__name__)
 
@@ -45,3 +47,17 @@
             log.warn("Discarded Sync. indexing for: %s" % entity)
             
 
+# class SolrIndexingWorker(Worker):
+#     """
+#     SolrIndexingWorker. Requires ckanext-queue >= 0.1.
+#     """
+    
+#     def consume(self, routing_key, operation, payload):
+#         assert 'solr_url' in self.config
+#         assert 'ckan.site_id' in self.config
+        
+#         if routing_key == 'Package':
+#             if operation in ['new', 'changed']:
+#                 index_package(payload, self.config) 
+#             elif operation == 'deleted':
+#                 delete_package(payload, self.config)

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list