Skip to content

All tasks should have a useful name attribute #127

@bitprophet

Description

@bitprophet

Currently Task has two "namey" attributes, .name which is either None or the explicitly-given name (e.g. @task(name='foo')), and __name__ which copies self.body.__name__ (so typically the name of a wrapped function.)

However, most code, and certainly the natural feeling API, is to always look at task_obj.name - which as above is going to be None a lot of the time if not explicitly given.

Switch it to a property that falls back to __name__ when name is not set.

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