Change timing of publish to timeout only
Add test for models.db