Celery task and the task's business logic are too tightly coupled.
There should be a directory based module for processing. Individual files for:
- states.py -- dict based state classes for upload and calculation
- xxx_task.py -- celery independent task logic for open_upload, calc, close_upload
- handler.py -- the task initiating deamon
- process.py -- the celery logic, celery task wrapper, canvas, utils