Skip to content

Commit c1eed05

Browse files
emyllerkhvn26
andauthored
feat: Add make shortcut to run both API and worker (#5565)
Co-authored-by: Kim Gustyr <kim.gustyr@flagsmith.com>
1 parent 50cac6f commit c1eed05

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

api/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,17 @@ django-collect-static:
9595
poetry run python manage.py collectstatic --noinput
9696

9797
.PHONY: serve
98-
serve:
98+
serve: docker-up
9999
poetry run flagsmith start --reload api
100-
100+
101+
.PHONY: run-task-processor
102+
run-task-processor: docker-up
103+
poetry run flagsmith start --reload --bind 0.0.0.0:8001 task-processor
104+
105+
.PHONY: serve-with-task-processor
106+
serve-with-task-processor: TASK_RUN_METHOD=TASK_PROCESSOR
107+
serve-with-task-processor:
108+
make -j2 serve run-task-processor
101109

102110
.PHONY: generate-ld-client-types
103111
generate-ld-client-types:

docs/docs/deployment/hosting/locally-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ found in the following section entitled 'Databases'.
1313
cd api
1414
make install
1515
make django-migrate
16-
make serve
16+
make serve-with-task-processor # Or `make serve` for API + synchronous tasks (limited functionality)
1717
```
1818

1919
You can now visit `http://<your-server-domain:8000>/api/v1/users/config/init/` to create an initial Superuser and

0 commit comments

Comments
 (0)