How to get task_id inside the task function in django-q?

36 Views Asked by At

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.

0

There are 0 best solutions below