Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Pusher push multiple time to datastore (Api called twice) #2911

Closed
Xenros opened this issue Mar 14, 2016 · 1 comment
Closed

Data Pusher push multiple time to datastore (Api called twice) #2911

Xenros opened this issue Mar 14, 2016 · 1 comment
Assignees

Comments

@Xenros
Copy link

Xenros commented Mar 14, 2016

CKAN Version if known (or site URL)

Ckan: 2.5.1
Ubuntu 12.10

Please describe the actual behaviour

My ckan is install on ubuntu 12.10 with ckan version 2.5.1
I have successfully install datapusher and datastore. But sometime when i upload a dataset, datapusher always got called 2 times. This error happened randomly, sometime it push normally but most of the time it pushes twice.

I check the log, most of the api got called twice when i upload a dataset or view the dataset. Such as store_create,datastore_delete, datastore_search etc.

@amercader amercader self-assigned this Mar 15, 2016
@amercader
Copy link
Member

That's actually caused because of the way CKAN handles dataset creation in different stages.

When you create a dataset via the form it's created in a state of draft. When adding a resource file in the next stage, the DataPusher will be called (if it's a CSV or Excel file) as this is a dataset update. Then we you click on "Save" to finish the creation of the dataset, the dataset is set to active, which is a dataset update that will trigger again a DataPusher call.

It is inefficient but it shouldn't have any adverse effects and because of the way dataset creation is implemented there's not an immediate or easy fix for it.

I'll close this as there is no immediate action but feel free to reopen if you think otherwise. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants