This will be used in a followup PR to order search results instead of the RAC join. Currently, the join with the RAC table in search results in a lookup of ~600K rows, which causes searching to take ~6s. This PR denormalizes the data we need, as well as allowing us to score based on a wider band (6 months vs the current 1 week).
10 lines
404 B
Python
10 lines
404 B
Python
from data import model, database
|
|
from test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file
|
|
from workers.repositoryactioncounter import RepositoryActionCountWorker
|
|
|
|
def test_repositoryactioncount(app):
|
|
database.RepositoryActionCount.delete().execute()
|
|
database.RepositorySearchScore.delete().execute()
|
|
|
|
rac = RepositoryActionCountWorker()
|
|
rac._count_repository_actions()
|