We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Need Model and worker info for releases worker
The new releases worker needs to have sections added for the model and the worker in the augur.config.json in order to run. 


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `augur/cli/configure.py`
Content:
```
1 #SPDX-License-Identifier: MIT
2 """
3 Augur library script for generating a config file
4 """
5 
6 import os
7 import click
8 import json
9 
10 from augur import logger
11 
12 ENVVAR_PREFIX = "AUGUR_"
13 
14 default_config = {
15         "Database": {
16             "name": "augur",
17             "host": "localhost",
18             "key": "key",
19             "password": "augur",
20             "port": 5432,
21             "user": "augur",
22             "gitlab_api_key":"gitlab_api_key"
23         },
24         "Housekeeper": {
25             "jobs": [
26                 {
27                     "all_focused": 1,
28                     "delay": 150000,
29                     "given": [
30                         "github_url"
31                     ],
32                     "model": "issues",
33                     "repo_group_id": 0
34                 },
35                 {
36                     "delay": 150000,
37                     "given": [
38                         "github_url"
39                     ],
40                     "model": "pull_request_commits",
41                     "repo_group_id": 0
42                 },
43                 {
44                     "delay": 150000,
45                     "given": [
46                         "github_url"
47                     ],
48                     "model": "repo_info",
49                     "repo_group_id": 0
50                 },
51                 {
52                     "delay": 150000,
53                     "given": [
54                         "repo_group"
55                     ],
56                     "model": "commits",
57                     "repo_group_id": 0
58                 },
59                 {
60                     "delay": 1000000,
61                     "given": [
62                         "github_url"
63                     ],
64                     "model": "pull_requests",
65                     "repo_group_id": 0
66                 },
67                 {
68                     "delay": 1000000,
69                     "given": [
70                         "git_url"
71                     ],
72                     "model": "contributors",
73                     "repo_group_id": 0
74                 },                
75                 {
76                     "delay": 1000000,
77                     "given": [
78                         "git_url"
79                     ],
80                     "model": "insights",
81                     "repo_group_id": 0
82                 },
83                 {
84                     "delay": 1000000,
85                     "given": [
86                         "git_url"
87                     ],
88                     "model": "badges",
89                     "repo_group_id": 0
90                 },
91                 {
92                     "delay": 1000000,
93                     "given": [
94                         "git_url"
95                     ],
96                     "model": "value",
97                     "repo_group_id": 0
98                 },
99                 {
100                 "delay": 100000,
101                 "given": [
102                     "github_url"
103                 ],
104                 "model": "pull_request_files",
105                 "repo_group_id": 0
106                 }
107             ]
108         },
109         "Workers": {
110             "facade_worker": {
111                 "port": 50100,
112                 "repo_directory": "repos/",
113                 "switch": 1,
114                 "workers": 1
115             },
116             "github_worker": {
117                 "port": 50200,
118                 "switch": 1,
119                 "workers": 1
120             },
121             "insight_worker": {
122                 "port": 50300,
123                 "metrics": {"issues-new": "issues", "code-changes": "commit_count", "code-changes-lines": "added", 
124                            "reviews": "pull_requests", "contributors-new": "new_contributors"},
125                 "contamination": 0.041,
126                 "switch": 0,
127                 "workers": 1,
128                 "training_days": 365,
129                 "anomaly_days": 2
130             },
131             "linux_badge_worker": {
132                 "port": 50400,
133                 "switch": 1,
134                 "workers": 1
135             },
136             "metric_status_worker": {
137                 "port": 50500,
138                 "switch": 0,
139                 "workers": 1
140             },
141             "pull_request_worker": {
142                 "port": 50600,
143                 "switch": 1,
144                 "workers": 1
145             },
146             "repo_info_worker": {
147                 "port": 50700,
148                 "switch": 1,
149                 "workers": 1
150             },
151             "value_worker": {
152                 "port": 50800,
153                 "scc_bin": "scc",
154                 "switch": 0,
155                 "workers": 1
156             },
157             "contributor_worker": {
158                 "port": 50900,
159                 "switch": 1,
160                 "workers": 1
161             },
162             "gitlab_issues_worker": {
163                 "port": 51000,
164                 "switch": 1,
165                 "workers": 1
166             },
167         },
168         "Facade": {
169             "check_updates": 1,
170             "clone_repos": 1,
171             "create_xlsx_summary_files": 1,
172             "delete_marked_repos": 0,
173             "fix_affiliations": 1,
174             "force_analysis": 1,
175             "force_invalidate_caches": 1,
176             "force_updates": 1,
177             "limited_run": 0,
178             "multithreaded": 0,
179             "nuke_stored_affiliations": 0,
180             "pull_repos": 1,
181             "rebuild_caches": 1,
182             "run_analysis": 1
183         },
184         "Server": {
185             "cache_expire": "3600",
186             "host": "0.0.0.0",
187             "port": "5000",
188             "workers": 4,
189             "timeout": 60
190         },
191         "Frontend": {
192             "host": "0.0.0.0",
193             "port": "5000"
194         },
195         "Development": {
196             "log_level": "INFO"
197         }
198     }
199 
200 @click.group('configure', short_help='Generate an augur.config.json')
201 def cli():
202     pass
203 
204 @cli.command('generate')
205 @click.option('--db_name', help="Database name for your data collection database", envvar=ENVVAR_PREFIX + 'DB_NAME')
206 @click.option('--db_host', help="Host for your data collection database", envvar=ENVVAR_PREFIX + 'DB_HOST')
207 @click.option('--db_user', help="User for your data collection database", envvar=ENVVAR_PREFIX + 'DB_USER')
208 @click.option('--db_port', help="Port for your data collection database", envvar=ENVVAR_PREFIX + 'DB_PORT')
209 @click.option('--db_password', help="Password for your data collection database", envvar=ENVVAR_PREFIX + 'DB_PASSWORD')
210 @click.option('--gitlab_api_key', help="GitLab API key for data collection from the GitLab API", envvar=ENVVAR_PREFIX + 'GITLAB_API_KEY')
211 @click.option('--github_api_key', help="GitHub API key for data collection from the GitHub API", envvar=ENVVAR_PREFIX + 'GITHUB_API_KEY')
212 @click.option('--facade_repo_directory', help="Directory on the database server where Facade should clone repos", envvar=ENVVAR_PREFIX + 'FACADE_REPO_DIRECTORY')
213 @click.option('--rc-config-file', help="File containing existing config whose values will be used as the defaults", type=click.Path(exists=True))
214 def generate(db_name, db_host, db_user, db_port, db_password, github_api_key, facade_repo_directory, rc_config_file, gitlab_api_key):
215     """
216     Generate an augur.config.json
217     """
218 
219     config = default_config
220     rc_config = None
221 
222     if rc_config_file != None:
223         try:
224             with open(os.path.abspath(rc_config_file), 'r') as f:
225                 rc_config = json.load(f)
226                 for item in rc_config.items():
227                     if item[0] == 'Workers':
228                         for index in range(0, len(item[1])):
229                             key = list(item[1].keys())[index]
230                             secondary_dict = list(item[1].values())[index]
231 
232                             for secondary_dict_index in range(0, len(secondary_dict)):
233                                 secondary_key = list(secondary_dict.keys())[secondary_dict_index]
234                                 value = list(secondary_dict.values())[secondary_dict_index]
235 
236                                 config[item[0]][key][secondary_key] = value
237                     else:
238                         for index, key in enumerate(list(item[1].keys())):
239                             config[item[0]][key] = list(item[1].values())[index]
240 
241                 logger.info('Predefined config successfully loaded')
242 
243         except Exception as e:
244             logger.error(f"Error opening {rc_config_file}: {str(e)}")
245 
246     if db_name is not None:
247         config['Database']['database'] = db_name # this is for backwards compatibility
248     if db_name is not None:
249         config['Database']['name'] = db_name
250     if db_host is not None:
251         config['Database']['host'] = db_host
252     if db_port is not None:
253         config['Database']['port'] = int(db_port)
254     if db_user is not None:
255         config['Database']['user'] = db_user
256     if db_password is not None:
257         config['Database']['password'] = db_password
258     if github_api_key is not None:
259         config['Database']['key'] = github_api_key
260     if gitlab_api_key is not None:
261         config['Database']['gitlab_api_key'] = gitlab_api_key
262     if facade_repo_directory is not None:
263         config['Workers']['facade_worker']['repo_directory'] = facade_repo_directory
264 
265     try:
266         with open(os.path.abspath('augur.config.json'), 'w') as f:
267             json.dump(config, f, indent=4)
268             logger.info('augur.config.json successfully created')
269     except Exception as e:
270         logger.error("Error writing augur.config.json " + str(e))
271
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/augur/cli/configure.py b/augur/cli/configure.py
--- a/augur/cli/configure.py
+++ b/augur/cli/configure.py
@@ -164,6 +164,11 @@
                 "switch": 1,
                 "workers": 1
             },
+            "release_worker": {
+                "port": 51100,
+                "switch": 1,
+                "workers": 1
+            },
         },
         "Facade": {
             "check_updates": 1,

{"golden_diff": "diff --git a/augur/cli/configure.py b/augur/cli/configure.py\n--- a/augur/cli/configure.py\n+++ b/augur/cli/configure.py\n@@ -164,6 +164,11 @@\n                 \"switch\": 1,\n                 \"workers\": 1\n             },\n+            \"release_worker\": {\n+                \"port\": 51100,\n+                \"switch\": 1,\n+                \"workers\": 1\n+            },\n         },\n         \"Facade\": {\n             \"check_updates\": 1,\n", "issue": "Need Model and worker info for releases worker\nThe new releases worker needs to have sections added for the model and the worker in the augur.config.json in order to run. \r\n\n", "before_files": [{"content": "#SPDX-License-Identifier: MIT\n\"\"\"\nAugur library script for generating a config file\n\"\"\"\n\nimport os\nimport click\nimport json\n\nfrom augur import logger\n\nENVVAR_PREFIX = \"AUGUR_\"\n\ndefault_config = {\n        \"Database\": {\n            \"name\": \"augur\",\n            \"host\": \"localhost\",\n            \"key\": \"key\",\n            \"password\": \"augur\",\n            \"port\": 5432,\n            \"user\": \"augur\",\n            \"gitlab_api_key\":\"gitlab_api_key\"\n        },\n        \"Housekeeper\": {\n            \"jobs\": [\n                {\n                    \"all_focused\": 1,\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"issues\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"pull_request_commits\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"repo_info\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"repo_group\"\n                    ],\n                    \"model\": \"commits\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"pull_requests\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"contributors\",\n                    \"repo_group_id\": 0\n                },                \n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"insights\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"badges\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"value\",\n                    \"repo_group_id\": 0\n                },\n                {\n                \"delay\": 100000,\n                \"given\": [\n                    \"github_url\"\n                ],\n                \"model\": \"pull_request_files\",\n                \"repo_group_id\": 0\n                }\n            ]\n        },\n        \"Workers\": {\n            \"facade_worker\": {\n                \"port\": 50100,\n                \"repo_directory\": \"repos/\",\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"github_worker\": {\n                \"port\": 50200,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"insight_worker\": {\n                \"port\": 50300,\n                \"metrics\": {\"issues-new\": \"issues\", \"code-changes\": \"commit_count\", \"code-changes-lines\": \"added\", \n                           \"reviews\": \"pull_requests\", \"contributors-new\": \"new_contributors\"},\n                \"contamination\": 0.041,\n                \"switch\": 0,\n                \"workers\": 1,\n                \"training_days\": 365,\n                \"anomaly_days\": 2\n            },\n            \"linux_badge_worker\": {\n                \"port\": 50400,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"metric_status_worker\": {\n                \"port\": 50500,\n                \"switch\": 0,\n                \"workers\": 1\n            },\n            \"pull_request_worker\": {\n                \"port\": 50600,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"repo_info_worker\": {\n                \"port\": 50700,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"value_worker\": {\n                \"port\": 50800,\n                \"scc_bin\": \"scc\",\n                \"switch\": 0,\n                \"workers\": 1\n            },\n            \"contributor_worker\": {\n                \"port\": 50900,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"gitlab_issues_worker\": {\n                \"port\": 51000,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n        },\n        \"Facade\": {\n            \"check_updates\": 1,\n            \"clone_repos\": 1,\n            \"create_xlsx_summary_files\": 1,\n            \"delete_marked_repos\": 0,\n            \"fix_affiliations\": 1,\n            \"force_analysis\": 1,\n            \"force_invalidate_caches\": 1,\n            \"force_updates\": 1,\n            \"limited_run\": 0,\n            \"multithreaded\": 0,\n            \"nuke_stored_affiliations\": 0,\n            \"pull_repos\": 1,\n            \"rebuild_caches\": 1,\n            \"run_analysis\": 1\n        },\n        \"Server\": {\n            \"cache_expire\": \"3600\",\n            \"host\": \"0.0.0.0\",\n            \"port\": \"5000\",\n            \"workers\": 4,\n            \"timeout\": 60\n        },\n        \"Frontend\": {\n            \"host\": \"0.0.0.0\",\n            \"port\": \"5000\"\n        },\n        \"Development\": {\n            \"log_level\": \"INFO\"\n        }\n    }\n\n@click.group('configure', short_help='Generate an augur.config.json')\ndef cli():\n    pass\n\n@cli.command('generate')\n@click.option('--db_name', help=\"Database name for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_NAME')\n@click.option('--db_host', help=\"Host for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_HOST')\n@click.option('--db_user', help=\"User for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_USER')\n@click.option('--db_port', help=\"Port for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_PORT')\n@click.option('--db_password', help=\"Password for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_PASSWORD')\n@click.option('--gitlab_api_key', help=\"GitLab API key for data collection from the GitLab API\", envvar=ENVVAR_PREFIX + 'GITLAB_API_KEY')\n@click.option('--github_api_key', help=\"GitHub API key for data collection from the GitHub API\", envvar=ENVVAR_PREFIX + 'GITHUB_API_KEY')\n@click.option('--facade_repo_directory', help=\"Directory on the database server where Facade should clone repos\", envvar=ENVVAR_PREFIX + 'FACADE_REPO_DIRECTORY')\n@click.option('--rc-config-file', help=\"File containing existing config whose values will be used as the defaults\", type=click.Path(exists=True))\ndef generate(db_name, db_host, db_user, db_port, db_password, github_api_key, facade_repo_directory, rc_config_file, gitlab_api_key):\n    \"\"\"\n    Generate an augur.config.json\n    \"\"\"\n\n    config = default_config\n    rc_config = None\n\n    if rc_config_file != None:\n        try:\n            with open(os.path.abspath(rc_config_file), 'r') as f:\n                rc_config = json.load(f)\n                for item in rc_config.items():\n                    if item[0] == 'Workers':\n                        for index in range(0, len(item[1])):\n                            key = list(item[1].keys())[index]\n                            secondary_dict = list(item[1].values())[index]\n\n                            for secondary_dict_index in range(0, len(secondary_dict)):\n                                secondary_key = list(secondary_dict.keys())[secondary_dict_index]\n                                value = list(secondary_dict.values())[secondary_dict_index]\n\n                                config[item[0]][key][secondary_key] = value\n                    else:\n                        for index, key in enumerate(list(item[1].keys())):\n                            config[item[0]][key] = list(item[1].values())[index]\n\n                logger.info('Predefined config successfully loaded')\n\n        except Exception as e:\n            logger.error(f\"Error opening {rc_config_file}: {str(e)}\")\n\n    if db_name is not None:\n        config['Database']['database'] = db_name # this is for backwards compatibility\n    if db_name is not None:\n        config['Database']['name'] = db_name\n    if db_host is not None:\n        config['Database']['host'] = db_host\n    if db_port is not None:\n        config['Database']['port'] = int(db_port)\n    if db_user is not None:\n        config['Database']['user'] = db_user\n    if db_password is not None:\n        config['Database']['password'] = db_password\n    if github_api_key is not None:\n        config['Database']['key'] = github_api_key\n    if gitlab_api_key is not None:\n        config['Database']['gitlab_api_key'] = gitlab_api_key\n    if facade_repo_directory is not None:\n        config['Workers']['facade_worker']['repo_directory'] = facade_repo_directory\n\n    try:\n        with open(os.path.abspath('augur.config.json'), 'w') as f:\n            json.dump(config, f, indent=4)\n            logger.info('augur.config.json successfully created')\n    except Exception as e:\n        logger.error(\"Error writing augur.config.json \" + str(e))\n", "path": "augur/cli/configure.py"}], "after_files": [{"content": "#SPDX-License-Identifier: MIT\n\"\"\"\nAugur library script for generating a config file\n\"\"\"\n\nimport os\nimport click\nimport json\n\nfrom augur import logger\n\nENVVAR_PREFIX = \"AUGUR_\"\n\ndefault_config = {\n        \"Database\": {\n            \"name\": \"augur\",\n            \"host\": \"localhost\",\n            \"key\": \"key\",\n            \"password\": \"augur\",\n            \"port\": 5432,\n            \"user\": \"augur\",\n            \"gitlab_api_key\":\"gitlab_api_key\"\n        },\n        \"Housekeeper\": {\n            \"jobs\": [\n                {\n                    \"all_focused\": 1,\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"issues\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"pull_request_commits\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"repo_info\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 150000,\n                    \"given\": [\n                        \"repo_group\"\n                    ],\n                    \"model\": \"commits\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"github_url\"\n                    ],\n                    \"model\": \"pull_requests\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"contributors\",\n                    \"repo_group_id\": 0\n                },                \n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"insights\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"badges\",\n                    \"repo_group_id\": 0\n                },\n                {\n                    \"delay\": 1000000,\n                    \"given\": [\n                        \"git_url\"\n                    ],\n                    \"model\": \"value\",\n                    \"repo_group_id\": 0\n                },\n                {\n                \"delay\": 100000,\n                \"given\": [\n                    \"github_url\"\n                ],\n                \"model\": \"pull_request_files\",\n                \"repo_group_id\": 0\n                }\n            ]\n        },\n        \"Workers\": {\n            \"facade_worker\": {\n                \"port\": 50100,\n                \"repo_directory\": \"repos/\",\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"github_worker\": {\n                \"port\": 50200,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"insight_worker\": {\n                \"port\": 50300,\n                \"metrics\": {\"issues-new\": \"issues\", \"code-changes\": \"commit_count\", \"code-changes-lines\": \"added\", \n                           \"reviews\": \"pull_requests\", \"contributors-new\": \"new_contributors\"},\n                \"contamination\": 0.041,\n                \"switch\": 0,\n                \"workers\": 1,\n                \"training_days\": 365,\n                \"anomaly_days\": 2\n            },\n            \"linux_badge_worker\": {\n                \"port\": 50400,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"metric_status_worker\": {\n                \"port\": 50500,\n                \"switch\": 0,\n                \"workers\": 1\n            },\n            \"pull_request_worker\": {\n                \"port\": 50600,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"repo_info_worker\": {\n                \"port\": 50700,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"value_worker\": {\n                \"port\": 50800,\n                \"scc_bin\": \"scc\",\n                \"switch\": 0,\n                \"workers\": 1\n            },\n            \"contributor_worker\": {\n                \"port\": 50900,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"gitlab_issues_worker\": {\n                \"port\": 51000,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n            \"release_worker\": {\n                \"port\": 51100,\n                \"switch\": 1,\n                \"workers\": 1\n            },\n        },\n        \"Facade\": {\n            \"check_updates\": 1,\n            \"clone_repos\": 1,\n            \"create_xlsx_summary_files\": 1,\n            \"delete_marked_repos\": 0,\n            \"fix_affiliations\": 1,\n            \"force_analysis\": 1,\n            \"force_invalidate_caches\": 1,\n            \"force_updates\": 1,\n            \"limited_run\": 0,\n            \"multithreaded\": 0,\n            \"nuke_stored_affiliations\": 0,\n            \"pull_repos\": 1,\n            \"rebuild_caches\": 1,\n            \"run_analysis\": 1\n        },\n        \"Server\": {\n            \"cache_expire\": \"3600\",\n            \"host\": \"0.0.0.0\",\n            \"port\": \"5000\",\n            \"workers\": 4,\n            \"timeout\": 60\n        },\n        \"Frontend\": {\n            \"host\": \"0.0.0.0\",\n            \"port\": \"5000\"\n        },\n        \"Development\": {\n            \"log_level\": \"INFO\"\n        }\n    }\n\n@click.group('configure', short_help='Generate an augur.config.json')\ndef cli():\n    pass\n\n@cli.command('generate')\n@click.option('--db_name', help=\"Database name for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_NAME')\n@click.option('--db_host', help=\"Host for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_HOST')\n@click.option('--db_user', help=\"User for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_USER')\n@click.option('--db_port', help=\"Port for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_PORT')\n@click.option('--db_password', help=\"Password for your data collection database\", envvar=ENVVAR_PREFIX + 'DB_PASSWORD')\n@click.option('--gitlab_api_key', help=\"GitLab API key for data collection from the GitLab API\", envvar=ENVVAR_PREFIX + 'GITLAB_API_KEY')\n@click.option('--github_api_key', help=\"GitHub API key for data collection from the GitHub API\", envvar=ENVVAR_PREFIX + 'GITHUB_API_KEY')\n@click.option('--facade_repo_directory', help=\"Directory on the database server where Facade should clone repos\", envvar=ENVVAR_PREFIX + 'FACADE_REPO_DIRECTORY')\n@click.option('--rc-config-file', help=\"File containing existing config whose values will be used as the defaults\", type=click.Path(exists=True))\ndef generate(db_name, db_host, db_user, db_port, db_password, github_api_key, facade_repo_directory, rc_config_file, gitlab_api_key):\n    \"\"\"\n    Generate an augur.config.json\n    \"\"\"\n\n    config = default_config\n    rc_config = None\n\n    if rc_config_file != None:\n        try:\n            with open(os.path.abspath(rc_config_file), 'r') as f:\n                rc_config = json.load(f)\n                for item in rc_config.items():\n                    if item[0] == 'Workers':\n                        for index in range(0, len(item[1])):\n                            key = list(item[1].keys())[index]\n                            secondary_dict = list(item[1].values())[index]\n\n                            for secondary_dict_index in range(0, len(secondary_dict)):\n                                secondary_key = list(secondary_dict.keys())[secondary_dict_index]\n                                value = list(secondary_dict.values())[secondary_dict_index]\n\n                                config[item[0]][key][secondary_key] = value\n                    else:\n                        for index, key in enumerate(list(item[1].keys())):\n                            config[item[0]][key] = list(item[1].values())[index]\n\n                logger.info('Predefined config successfully loaded')\n\n        except Exception as e:\n            logger.error(f\"Error opening {rc_config_file}: {str(e)}\")\n\n    if db_name is not None:\n        config['Database']['database'] = db_name # this is for backwards compatibility\n    if db_name is not None:\n        config['Database']['name'] = db_name\n    if db_host is not None:\n        config['Database']['host'] = db_host\n    if db_port is not None:\n        config['Database']['port'] = int(db_port)\n    if db_user is not None:\n        config['Database']['user'] = db_user\n    if db_password is not None:\n        config['Database']['password'] = db_password\n    if github_api_key is not None:\n        config['Database']['key'] = github_api_key\n    if gitlab_api_key is not None:\n        config['Database']['gitlab_api_key'] = gitlab_api_key\n    if facade_repo_directory is not None:\n        config['Workers']['facade_worker']['repo_directory'] = facade_repo_directory\n\n    try:\n        with open(os.path.abspath('augur.config.json'), 'w') as f:\n            json.dump(config, f, indent=4)\n            logger.info('augur.config.json successfully created')\n    except Exception as e:\n        logger.error(\"Error writing augur.config.json \" + str(e))\n", "path": "augur/cli/configure.py"}]}