Enqueuing all identifiers logic
Closed this issue · 3 comments
As stated in #5, currently the only way for an importer to enqueue identifiers is to implement the \Webgriffe\SyliusAkeneoPlugin\ImporterInterface::getIdentifiersModifiedSince()
which assumes that you can get from the Akeneo API only those resources modified since a given date.
Unfortunately this is not always true. On the contrary this is true only for products and product models, all other resources cannot be fetched by "updated at" date/time.
So we need a different enqueuing logic.
Based on the fact that all these resources are "catalog structure", they should not change very often. So one solution could be to enqueue all identifiers for this resources.
Doing so will require a change in the webgriffe:akeneo:enqueue
CLI command to allow users to have a different cron schedule potentially for every resource/importer (or a completely separate command).
@fabianaromagnoli @LucaGallinari my proposal for the webgriffe:akeneo:enqueue
command is:
- Add a new
--importer="<importer>"
option which if specified enqueue only items for the given importer. If not specified will enqueue items for all importers (like it does now) - Add a new
--all
option. If given it will enqueue all identifiers for the given importers (or all importers). One of--all
,--since
or--since-file
must be specified.
Those changes should be backward compatibile.
What do you think?
It's a good solution!