fix length calculation of celery queue