[ckan-changes] [ckan/ckan] 83d865: [#2856] Avoid submitting resources to the DataPush...

GitHub noreply at github.com
Thu Mar 17 13:50:35 UTC 2016


  Branch: refs/heads/2856-fix-datapusher-multiple-calls
  Home:   https://github.com/ckan/ckan
  Commit: 83d865e9e80ea79cdc4ee74f73b5c01699ac4357
      https://github.com/ckan/ckan/commit/83d865e9e80ea79cdc4ee74f73b5c01699ac4357
  Author: amercader <amercadero at gmail.com>
  Date:   2016-03-17 (Thu, 17 Mar 2016)

  Changed paths:
    M ckanext/datapusher/plugin.py

  Log Message:
  -----------
  [#2856] Avoid submitting resources to the DataPusher multiple times

The datapusher plugin uses the notify extension point to check if a
resource was created or updated. `datapusher_submit` will create a new
task with status pending when first called and `datapusher_hook` will
mark it as complete when necessary. We can use that to avoid resending
jobs unnecessarily.


  Commit: c4306a248dd064ac1a5fbbcf4d37d23a18561e0c
      https://github.com/ckan/ckan/commit/c4306a248dd064ac1a5fbbcf4d37d23a18561e0c
  Author: amercader <amercadero at gmail.com>
  Date:   2016-03-17 (Thu, 17 Mar 2016)

  Changed paths:
    M ckanext/datastore/logic/action.py

  Log Message:
  -----------
  [#2856] Only set datastore_active when necessary

Rather than updating the resource always, just do it when is actually
needed, ie:

* On datastore_create, when the resource doesn't already has a
  datastore_active=True extra

* On datastore_delete, only if the resource has datastore_active=False


  Commit: 461afadd285c9036e18572470bd19901754835b8
      https://github.com/ckan/ckan/commit/461afadd285c9036e18572470bd19901754835b8
  Author: amercader <amercadero at gmail.com>
  Date:   2016-03-17 (Thu, 17 Mar 2016)

  Changed paths:
    M ckanext/datastore/tests/test_create.py

  Log Message:
  -----------
  [#2856] Add some tests


Compare: https://github.com/ckan/ckan/compare/83d865e9e80e^...461afadd285c


More information about the ckan-changes mailing list