What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello all, I have implemented a custom importer with the following DataSetWriter. The product is imp

Posts: 217 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello all, I have implemented a custom importer with the following DataSetWriter. The product is imported successfully but it doesn't seem to get published (or added to Redis) for Yves frontend. Can someone please see the following code and advise me if I am doing it right.

class AepImportConcreteProductWriter implements DataSetWriterInterface
{
    use DataSetWriterPersistenceStateAwareTrait;

    /**
     * @inheritDoc
     */
    public function write(DataSetInterface $dataSet)
    {
        ...

        DataImporterPublisher::addEvent(
            ProductEvents::PRODUCT_CONCRETE_PUBLISH,
            $spyConcreteProductId
        );
        DataImporterPublisher::addEvent(
            ProductEvents::PRODUCT_ABSTRACT_PUBLISH,
            $spyAbstractProductId
        );
    }

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Posts: 91 πŸ§‘πŸ»β€πŸš€ - Cadet

    These two commands look good to me, but this issue can have quite a lot of possible causes and so this alone is not enough to solve it. What else are you doing and how? What data are you providing, how, in what order? Have you checked if everything is written correctly into the db?
    And, on the other side, in Redis, don't you see anything at all for the products you've imported?

    (Also, out of curiosity: why a "custom" importer? Why not build on the original/default one and modify/extend that as needed?)

  • Spryker Customer Posts: 143 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2023

    do u see the events in rabbitmq? is queue worker running to consume the events? u actually do not need to create custom events, a $entity->save() should be enough to create propel events

  • Posts: 91 πŸ§‘πŸ»β€πŸš€ - Cadet

    Good point. A few days ago too, your Jenkins was down due to the testing mode. Maybe you have the same issue again?

  • Posts: 217 πŸ§‘πŸ»β€πŸš€ - Cadet

    @U04FXCTCWPP The data is being added correctly in the database. About "Why a custom importer", we have complex data to import some of which is generated on the go. Also, Jenkins is working.

    @UNGMX0012 I will check if there events are there.

  • Posts: 217 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UNGMX0012 @U04FXCTCWPP

    It looks like I am missing a schema that needs to be updated through propel to trigger publish and synchronise events. What do you think?

  • Posts: 91 πŸ§‘πŸ»β€πŸš€ - Cadet

Welcome!

It looks like you're new here. Sign in or register to get started.