Make tasks.py not query the DB when imported.
Not a very clean approach, needs to be cleaned up later.