refactored celery task management