I found the problem!
I wasn't acking the task when it finished
It wasn't something that gave an answer, so I did't get the result. I only checked that it was on rabbitmq like this:
async_result = available_tasks[task_name].apply_async(args=[data], kwargs=kwargs)
data = {'job_id': async_result.id, 'state': async_result.state}
code = 200
status = True
message = ''
return response(status, code, data, message)
But I shoulded use something like this:
async_result = available_tasks[task_name].apply_async(args=[data], kwargs=kwargs)
data = {'job_id': async_result.id, 'state': async_result.state, 'job_result': async_result.get()}
code = 200
status = True
message = ''
return response(status, code, data, message)
If I wouldn't use the get function rabbitmq would wait for the acknowledgement and disconect. That was the origin of the problem