Add --reload flag to data synchronization script #12
4
app.py
4
app.py
@ -336,10 +336,12 @@ def main():
|
||||
fs = os.getenv('FS')
|
||||
layer = os.getenv('LAYER')
|
||||
|
||||
logger.info("Truncating the feature layer.")
|
||||
truncate(token, hostname, instance, fs, layer)
|
||||
|
||||
# If --reload flag is set, load data from the specified file
|
||||
if reload_file:
|
||||
logger.info(f"Reloading data from file: {reload_file}")
|
||||
truncate(token, hostname, instance, fs, layer) # Truncate the layer
|
||||
|
||||
# Load data from the specified file
|
||||
with open(reload_file, 'r', encoding='utf-8') as f:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user