mirror of
https://github.com/Lore09/Tesi-Magistrale.git
synced 2025-12-19 12:24:31 +00:00
Added processor template
This commit is contained in:
@@ -41,7 +41,21 @@ def __generate_producer(task, output_dir):
|
||||
|
||||
|
||||
def __generate_processor(task, output_dir):
|
||||
pass
|
||||
# Copy the template folder to the output folder
|
||||
__copytree("src/code_generator/templates/processor_nats", f"{output_dir}/{task['component_name']}")
|
||||
|
||||
# Replace each file of the output dir with the template
|
||||
for filename in os.listdir(f"{output_dir}/{task['component_name']}"):
|
||||
|
||||
# Skip the following files
|
||||
if filename in ['Dockerfile', 'go.mod', 'go.sum', 'tools.go', 'bindings.wadge.go']:
|
||||
continue
|
||||
|
||||
# Skip if it's a directory
|
||||
if os.path.isdir(f"{output_dir}/{task['component_name']}/{filename}"):
|
||||
continue
|
||||
|
||||
__replace_file_with_template(filename, f"{output_dir}/{task['component_name']}", task)
|
||||
|
||||
def __generate_dbsync(task, output_dir):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user