Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from celery import chain
- from django.core.management.base import BaseCommand
- from . import tasks
- class Command(BaseCommand):
- def handle(self, *args, **kwargs):
- source_file = args[0]
- chain(
- tasks.fetch.s(source_file), # Fetch data from remote source
- tasks.blacklist.s(), # Remove blacklisted records
- tasks.transform.s(), # Transform raw data ready for loading
- tasks.load.s(), # Load into DB
- ).apply_async()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement