[ckan-dev] DataStore config questions

David Raznick kindly at gmail.com
Mon Jun 4 08:52:14 UTC 2012


Hello,

This is much more difficult to debug and is very setup specific.  It
is due to the celery tasks not being able to find the url or getting
the wrong url of your ckan instance and therefore can not communicate
back.

What is the address of your instance?  Is ckan under a particular
path.  Can you think of any reason why the tasks could have issues
with making a http request to ckan.

What would be great to see if you could get what is in the context
that is passed through.  Sadly there is no easy way to do logging in
the tasks.  The patch below could be added to print this out just
before the error.  Once added you will need to restart celery and then
try again.  The context should then be printed in the celery log.

David


diff --git a/ckanext/datastorer/tasks.py b/ckanext/datastorer/tasks.py
index ef1b3a6..fb4c03b 100644
--- a/ckanext/datastorer/tasks.py
+++ b/ckanext/datastorer/tasks.py
@@ -72,6 +72,7 @@ def datastorer_upload(context, data):
         context = json.loads(context)
         return _datastorer_upload(context, data)
     except Exception, e:
+        print context
         update_task_status(context, {
             'entity_id': data['id'],
             'entity_type': u'resource',





On Mon, Jun 4, 2012 at 7:38 AM, Jim Craner <jim at codeforamerica.org> wrote:
> Sorry for the delay in replying, please let me know if you need me to
> recontext any of these troubleshooting steps.
>
> On Sun, May 27, 2012 at 9:39 AM, David Raznick <kindly at gmail.com> wrote:
>
> [re: celeryd and datastorer not displaying any console or log output
> when attempting to preview a CSV]
>
>> yes, there should be some logging of each task.  Have you run python
>> setup.py develop in ckanext-datastorer and added datastorer to your plugins
>> in your ini file.
>
> I had not done the setup.py step within datastorer.  I ran that
> successfully, then restarted everything with the same result (no
> preview of simple test CSV resource).  This time, however, I did get
> the following console output in my celery console:
>
> http://pastebin.com/UqaZKcju
>
>> Has it got this in your celery output as well?
>>
>> [Tasks]
>>   . archiver.clean
>>   . archiver.link_checker
>>   . archiver.update
>>   . datastorer.upload
>
> Yes, see the pastebin referenced above.
>
> Thanks!
> Jim
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev




More information about the ckan-dev mailing list