Skip to content

ModuleNotFoundError: No module named 'MyIndex'  #472

@Bragegs

Description

@Bragegs

When using the CelerySignalProcessor we call registry_delete_task.

       @shared_task()
        def registry_delete_task(doc_label, data):
            doc_instance = import_module(doc_label)
            parallel = True
            doc_instance._bulk(bulk_data, parallel=parallel)

The parameter doc_label is one of my documents("MyIndex")

@registry.register_document
class MyIndex(Document):

The below line from registry_delete_task throws ModuleNotFoundError: No module named 'MyIndex' because MyIndex is not a module.

import_module('MyIndex')

sub issue: There exists a PR here to fix data parameter and rename it to what seems to be the correct name "bulk_data".. The bottom line of the function uses a variable(bulk_data) that does not exist in the function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy