flathunters / flathunter

A bot to help people with their rental real-estate search. 🏠🤖

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should we move the idMaintainer files?

veldhaenchen opened this issue · comments

Hey i was wondering if we should move the files containing all the database stuff into a dedicated folder at the root level.

under this we could store by default the file for sqlite database as well

We could then create an abstract class for these two (idmaintainer.py && googlecloud_idmaintainer.py) as already done in crawler and processor?

What do you think?

Hi @veldhaenchen ,

Sorry for the delayed reply. I think the idea of creating an abstract class for the id_maintainer interface is a good one, and I think if those end up in their own folder that's also good.

I would avoid moving the sqlite database away from the root directory. That creates a migration problem for people running old versions, and it makes it hard to see where the state of the application is stored.

In general, there is some criticism of the id_maintainer model - see the discussion on #473. I would love to see the code from that PR get merged, but that's a much larger refactor of how we handle storing the data from the previous crawls.

Maybe based on the comments in #473 you can also come up with a better name for what those classes are doing. And if you want to take a look at the long-term issues of supporting multi-user instances that would be very helpful.