Closed mzfr closed 4 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
tanner/server.py | 20 | 30 | 66.67% | ||
tanner/create_tables.py | 3 | 14 | 21.43% | ||
tanner/postgres_client.py | 8 | 24 | 33.33% | ||
<!-- | Total: | 31 | 68 | 45.59% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
tanner/server.py | 1 | 69.72% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 1273: | -1.04% |
Covered Lines: | 1416 |
Relevant Lines: | 1868 |
@glaslos We want to use both redis and pg in tanner: redis as a cache for sessions before analysis (since we delete them afterwards, redis indeed the cache) and pg for storing analysed sessions. In such a case we might separate analysis process into separate background task. Also we thought about keeping dorks in redis, because for each request we need access to them, and it would be faster.
What do you think?
This makes a lot of sense. You could even use a TTL to close, push to pg and then delete sessions. You can subscribe to TTL events.
@glaslos I've made the requested changes. Can you please review the table schema now?
Great job!
Things to be considered for the future: -- Splitting the analysis part and core tanner part -- Tests
I have also formatted some code in the server.py file.
@afeena @glaslos Can you please take a look at the table schema and let me know if any changes is needed in this. If not then I'll continue the work.