I am using django-q for running background tasks in my django application. I am now in a scenario where I need to get the task_id inside the task function.
A similar functionality in celery would look something like this: `
@celery.task
def scan(host):
print scan.request.id
`
I searched online and could not find a solution. Any help would be appreciated.