closeio / flask-common

Some commonly shared code for Flask, MongoEngine, and Python apps
26 stars 4 forks source link

Use wraps when using `retry` as a decorator #80

Closed thomasst closed 4 years ago

thomasst commented 4 years ago

This preserves the function's name (e.g. when used as a TaskTiger task)

thomasst commented 4 years ago

Previously you couldn’t use a function decorated with retry for TaskTiger since it wouldn’t be a valid name. So I don’t expect anything to “change”. Did you have specific concerns?

AlecRosenbaum commented 4 years ago

If they couldn't previously be used on tasks then my comment should be ignored.

I was just thinking of a task being used and having the serialized name of module.retry, then the upgrade breaking the currently queued tasks.