Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 4aae6f3

Browse files
committed
Prevent an empty resources: list if no listener_resources defined
This was causing worker_listener blocks to get generated with Nonetype resources, crashing things. This was only a problem for worker types that don't have any configured resources.
1 parent 0cca31e commit 4aae6f3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docker/conf/worker.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ worker_replication_http_port: 9093
1313
worker_listeners:
1414
- type: http
1515
port: {{ port }}
16+
{% if listener_resources %}
1617
resources:
1718
- names:
1819
{%- for resource in listener_resources %}
1920
- {{ resource }}
2021
{%- endfor %}
22+
{% endif %}

docker/configure_workers_and_start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def generate_worker_files(environ, config_path: str, data_dir: str):
271271
worker_types = []
272272
elif worker_types == "*":
273273
# Use all known worker types
274-
worker_types = WORKERS_CONFIG.keys()
274+
worker_types = list(WORKERS_CONFIG.keys())
275275
else:
276276
# Split type names by command
277277
worker_types = worker_types.split(",")

0 commit comments

Comments
 (0)