Skip to content

delay: Function key generation is obscure and need to be documented #122

@manisenkov

Description

@manisenkov

Calling delay.Func uses the name of the file from whom this function was called to generate the func key that used in the task invocation. It means that deploying new version of service can break execution of tasks that were scheduled before, if the call of delay.Func moved to the another file in code.
This behaviour is not documented and can cause a confusion.

Related lines of code:

appengine/delay/delay.go

Lines 105 to 107 in 5bee14b

// Derive unique, somewhat stable key for this func.
_, file, _, _ := runtime.Caller(1)
f.key = file + ":" + key

Metadata

Metadata

Assignees

No one assigned

    Labels

    bankruptFeel free to reopen when necessary.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions