File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def celeryconfig(self) -> dict:
1818 raise NotImplementedError ("CeleryTestContainer.celeryconfig" )
1919
2020 @classmethod
21- def command (cls ) -> list :
21+ def command (cls , * args : str ) -> list :
2222 # To be used with pytest_docker_tools.container using the command
2323 # kwarg with the class method as value
2424 # e.g. command=MyContainer.command()
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def default_redis_backend_cls() -> type[RedisContainer]:
3030 network = "{default_pytest_celery_network.name}" ,
3131 wrapper_class = RedisContainer ,
3232 timeout = REDIS_CONTAINER_TIMEOUT ,
33+ command = RedisContainer .command ("--maxclients" , "100000" ),
3334)
3435
3536
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def default_redis_broker_cls() -> type[RedisContainer]:
3030 network = "{default_pytest_celery_network.name}" ,
3131 wrapper_class = RedisContainer ,
3232 timeout = REDIS_CONTAINER_TIMEOUT ,
33+ command = RedisContainer .command ("--maxclients" , "100000" ),
3334)
3435
3536
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ def celeryconfig(self) -> dict:
2828 "vhost" : self .vhost ,
2929 }
3030
31+ @classmethod
32+ def command (cls , * args : str ) -> list :
33+ return ["redis-server" , * args ]
34+
3135 @property
3236 def url (self ) -> str :
3337 return f"{ self .prefix ()} { self .hostname } /{ self .vhost } "
You can’t perform that action at this time.
0 commit comments