from __future__ import absolute_import, unicode_literals

from celery.decorators import task
from celery.utils.log import get_task_logger
from django.core.management import call_command

logger = get_task_logger(__name__)


# runs the management command 'exportchannel' async through celery
@task(name='exportchannel_task')
def exportchannel_task(channel_id):
    call_command('exportchannel', channel_id, email=True)

@@ -350,16 +350,25 @@
 annel_id
+, user_id
 ):%0A    c
@@ -418,10 +418,27 @@
 ail=True
+, user_id=user_id
 )%0A

add missing user_id argument on exportchannel_task