Skip to content

Commit

Permalink
fix(deploy-candidate): Load redisearch in redis_queue
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunps committed Feb 3, 2025
1 parent 596870f commit 79c5382
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions press/docker/config/redis-queue.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ dir /home/frappe/frappe-bench/config/pids
pidfile /home/frappe/frappe-bench/config/pids/redis-queue.pid
bind 127.0.0.1
port 11000

{% if doc.is_redisearch_enabled %}
loadmodule /home/frappe/frappe-bench/redis/redisearch.so
{% endif %}
8 changes: 8 additions & 0 deletions press/press/doctype/deploy_candidate/deploy_candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ def _prepare_build_context(self, no_push: bool):

self._copy_config_files()
self._generate_redis_cache_config()
self._generate_redis_queue_config()

Check warning on line 917 in press/press/doctype/deploy_candidate/deploy_candidate.py

View check run for this annotation

Codecov / codecov/patch

press/press/doctype/deploy_candidate/deploy_candidate.py#L917

Added line #L917 was not covered by tests
self._generate_supervisor_config()
self._generate_apps_txt()
self.generate_ssh_keys()
Expand Down Expand Up @@ -1193,6 +1194,13 @@ def _generate_redis_cache_config(self):
content = frappe.render_template(redis_cache_conf_template, {"doc": self}, is_path=True)
f.write(content)

def _generate_redis_queue_config(self):
redis_queue_conf = os.path.join(self.build_directory, "config", "redis-queue.conf")
with open(redis_queue_conf, "w") as f:
redis_queue_conf_template = "press/docker/config/redis-queue.conf"
content = frappe.render_template(redis_queue_conf_template, {"doc": self}, is_path=True)
f.write(content)

Check warning on line 1202 in press/press/doctype/deploy_candidate/deploy_candidate.py

View check run for this annotation

Codecov / codecov/patch

press/press/doctype/deploy_candidate/deploy_candidate.py#L1198-L1202

Added lines #L1198 - L1202 were not covered by tests

def _generate_supervisor_config(self):
supervisor_conf = os.path.join(self.build_directory, "config", "supervisor.conf")
with open(supervisor_conf, "w") as f:
Expand Down

0 comments on commit 79c5382

Please sign in to comment.