Skip to content

Instantly share code, notes, and snippets.

@minhoryang
Last active February 9, 2017 11:19
Show Gist options
  • Save minhoryang/5308674eb766c05f55f52d6f7174dcc5 to your computer and use it in GitHub Desktop.
Save minhoryang/5308674eb766c05f55f52d6f7174dcc5 to your computer and use it in GitHub Desktop.
import pkgutil
flask.config['CELERY_IMPORTS'] = [
package_name
for _, package_name, _ in pkgutil.walk_packages('.')
if package_name.startswith('api.tasks.')
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment