mirror of
https://github.com/Lore09/Tesi-Magistrale.git
synced 2025-12-19 12:24:31 +00:00
Added task generator structure
This commit is contained in:
28
src/code_generator/template_compiler.py
Normal file
28
src/code_generator/template_compiler.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import logging
|
||||
|
||||
def handle_task(task, output_dir):
|
||||
|
||||
try:
|
||||
|
||||
match task['type']:
|
||||
case 'producer_nats':
|
||||
__generate_producer(task, output_dir)
|
||||
case 'processor_nats':
|
||||
__generate_processor(task, output_dir)
|
||||
case 'dbsync_nats':
|
||||
__generate_dbsync(task, output_dir)
|
||||
case _:
|
||||
logging.error(f"Task type {task['type']} not supported")
|
||||
pass
|
||||
except KeyError as e:
|
||||
logging.error(f"Error parsing task: {e}")
|
||||
pass
|
||||
|
||||
def __generate_producer(task, output_dir):
|
||||
pass
|
||||
|
||||
def __generate_processor(task, output_dir):
|
||||
pass
|
||||
|
||||
def __generate_dbsync(task, output_dir):
|
||||
pass
|
||||
Reference in New Issue
Block a user