Closed (fixed)
Project:
Salesforce Suite
Version:
8.x-3.x-dev
Component:
salesforce_pull.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 May 2017 at 13:13 UTC
Updated:
23 Aug 2017 at 18:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aaronbaumanYes, both push and pull buttons exist on the mapped object form.
Additionally, for pull, there are now drush commands to populate the pull queue from a query (sf-pull-query) or a file (sf-pull-file), and to forcibly process the push queue (sf-push-queue).
Comment #3
michaelpporter commentedHum `drush sfpq item_to_product_import` is adding items to the queue, 'Queued 2745 items for pull.' The custom PULL_PRESAVE function does not seem to be triggered. If I go to the salesforce tab edit and click 'pull' it does.
Why would a single forced refresh not call PULL_PRESAVE?
Comment #4
aaronbaumansfpq only populates the queue, but does not attempt to process it.
You need to run cron to process the queue, or use Drupal core's queue-run command.
Comment #5
michaelpporter commentedThe queue runs. I ran cron and watched it empty. but node titles did not refresh.
Comment #6
aaronbaumansounds like a problem with your mapping.
Comment #7
michaelpporter commentedHow so? the mapping brings in new items just fine and I can force an update which works. I can not do a bulk update.
To me it seems that this is the reason:
So I should add a call to PULL_PREPULL and add $mapped_object->forceUpdate(). Then remove it as we do not want that standard. Might be nice to have that as part of the drush call.
Comment #8
aaronbaumanahhh, sorry I just caught up to what you're asking about.
I'm open to any new feature or change that will accommodate both:
1. being able to force a pull regardless of timestamps
2. preventing pull of stale SF data from overwriting newer Drupal data
FWIW: In 7.x-2.x branch, this was accomplished with a stateful "force" property on the pull-queue-item itself.
Comment #9
michaelpporter commentedFYI this worked. Would be nice to have a single use global flag that would do this. Perhaps a entity level flag for do not update.
Comment #10
aaronbaumanWe've got a few different ways to force a pull now, in addition to the event subscriber described above.
- added a "force-pull" option to drush sfpq, which will add a "force_pull" flag to queue items while populating the pull queue
- added a "sf-pull-reset" drush command, which will reset the pull-trigger timestamps AND set all existing mapped objects to be forcibly re-pulled on the next cron run
I think these will address your use case, so I'll resolve this issue.