Skip to content

Commit c3a0cb2

Browse files
committed
✨(backend) update make index command
the index command has new params to add on the make command Signed-off-by: charles <charles.englebert@protonmail.com>
1 parent e8f3bac commit c3a0cb2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,16 @@ demo: ## flush db then create a demo for load testing purpose
259259
@$(MANAGE) create_demo
260260
.PHONY: demo
261261

262-
index: ## index all documents to remote search
263-
@$(MANAGE) index
262+
index: batch_size ?=
263+
index: lower_time_bound ?=
264+
index: upper_time_bound ?=
265+
index: crash_safe_mode ?=
266+
index: ## index all documents to indexer (params: batch_size, lower_time_bound, upper_time_bound, crash_safe_mode)
267+
@$(MANAGE) index \
268+
$(if $(batch_size),--batch-size $(batch_size)) \
269+
$(if $(lower_time_bound),--lower-time-bound "$(lower_time_bound)") \
270+
$(if $(upper_time_bound),--upper-time-bound "$(upper_time_bound)") \
271+
$(if $(crash_safe_mode),--crash-safe-mode)
264272
.PHONY: index
265273

266274
# Nota bene: Black should come after isort just in case they don't agree...

0 commit comments

Comments
 (0)