Skip to content

Commit 8787f77

Browse files
committed
services: skip index rebuilding
1 parent e4749f4 commit 8787f77

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

invenio_jobs/services/services.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,19 @@
2929
from .errors import JobNotFoundError, RunNotFoundError, RunStatusChangeError
3030

3131

32-
class TasksService(RecordService):
32+
class BaseService(RecordService):
33+
"""Base service class for DB-backed services.
34+
35+
NOTE: See https://github.com/inveniosoftware/invenio-records-resources/issues/583
36+
for future directions.
37+
"""
38+
39+
def rebuild_index(self, identity, uow=None):
40+
"""No-op since we search from the database directly."""
41+
return True
42+
43+
44+
class TasksService(BaseService):
3345
"""Tasks service."""
3446

3547
def search(self, identity, params):
@@ -78,7 +90,7 @@ def get_run(run_id, job_id=None):
7890
return run
7991

8092

81-
class JobsService(RecordService):
93+
class JobsService(BaseService):
8294
"""Jobs service."""
8395

8496
@unit_of_work()
@@ -173,7 +185,7 @@ def delete(self, identity, id_, uow=None):
173185
return True
174186

175187

176-
class RunsService(RecordService):
188+
class RunsService(BaseService):
177189
"""Runs service."""
178190

179191
def search(self, identity, job_id, params):

0 commit comments

Comments
 (0)