Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Starting a task on a local module without an explicit version fails #71

@cdman

Description

@cdman

The root cause of this is this GAE dev_server issue: when running a module locally with dev_appserver.py which doesn't have version: in app.yaml, it will have something like "None.175924092260391774 in os.environ['CURRENT_VERSION_ID']. This results in util._get_task_target() returning something like "None.modulename" which then raises a InvalidModuleError when trying to enqueue the task in _PipelineContext.start.

One possible solution would be:

  • hopefully the GAE dev_server bug gets fixed quickly
  • to migrate util._get_task_target() over to modules (since it's using undocumented APIs). Something like:
from google.appengine.api import modules

# ...

def _get_task_target():
  # ...
  module = modules.get_current_module_name()
  version = modules.get_current_version_name()
  # workaround until https://code.google.com/p/googleappengine/issues/detail?id=13178& gets fixed
  if version == "None": version = None 

  if module == "default":
    return version
  if version is None:
    return module
  return "%s.%s" % (version, module)

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