Skip to content

Commit 25e0214

Browse files
committed
force reindex
1 parent c1ffd71 commit 25e0214

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

knowledge_repo/app/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def index_sync_loop(app):
4040
current_app.db.engine.dispose()
4141
while True:
4242
with app.app_context():
43-
update_index(check_timeouts=False)
43+
update_index(check_timeouts=False, force=True)
4444
time.sleep(app.config['INDEXING_INTERVAL'])
4545

4646
app.index_watchdog = multiprocessing.Process(target=index_watchdog, args=(app,))
4747
app.index_watchdog.start()
4848
else:
4949
@app.before_request
5050
def update_index_if_required():
51-
update_index()
51+
update_index(force=True)
5252

5353

5454
def acquire_index_lock():

knowledge_repo/app/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def set(cls, type, name, value):
5252
db_session.add(m)
5353

5454
@classmethod
55-
def get_last_update(cls, type, name):
55+
def get_last_update(cls, type, name):z
5656
m = db_session.query(IndexMetadata).filter(IndexMetadata.type == type).filter(IndexMetadata.name == name).first()
5757
if m is not None:
5858
return m.updated_at

knowledge_repo/repositories/gitrepository.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
logger = logging.getLogger(__name__)
1515

1616

17-
import time
18-
19-
2017
class GitKnowledgeRepository(KnowledgeRepository):
2118
_registry_keys = ['git']
2219

0 commit comments

Comments
 (0)