tanium / octobot

github bot with slack and jira integration
MIT License
25 stars 16 forks source link

Fix slack db to be a singleton #362

Closed matthauck closed 1 year ago

matthauck commented 1 year ago

Because there were multiple slack dbs trying to be initialized at the same time, they were racing on the schema migration. There should only be a single db instance.

Also: expect sqlite db to be in the config dir, not the working dir.

matthauck commented 1 year ago

oh, actually. i think the migration failure that i saw was probably a race on the db creation. (realized in the course of this PR that we have two SlackDatabase instances. 😬)

this probably needs to go further...