Skip to content

Commit

Permalink
Fix Redis memory overcommit warning by adding Redis configuration opt…
Browse files Browse the repository at this point in the history
…ions

- Added --save "", --appendonly no, and --maxmemory-policy noeviction to Redis startup command
- Resolves the vm.overcommit_memory warning without using sysctl
  • Loading branch information
Nusnus committed Sep 13, 2024
1 parent 892ab7a commit 7470092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pytest_celery/vendors/redis/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def command(
wait_for_client: bool = True,
**kwargs: dict,
) -> list[str]:
return ["redis-server", *args]
return ["redis-server", "--save", "", "--appendonly", "no", "--maxmemory-policy", "noeviction", *args]

Check warning on line 47 in src/pytest_celery/vendors/redis/container.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/vendors/redis/container.py#L47

Added line #L47 was not covered by tests

@property
def url(self) -> str:
Expand Down

0 comments on commit 7470092

Please sign in to comment.