Skip to content

Commit

Permalink
fix: minor print lines updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Jan 29, 2024
1 parent d45923b commit 6c8682d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion migration-0.38/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN pip3 install -r requirements.txt
COPY . .

# run the binary
ENTRYPOINT [ "python3", "main.py"]
ENTRYPOINT [ "python3", "-u", "main.py"]
6 changes: 5 additions & 1 deletion migration-0.38/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
args = parser.parse_args()

if __name__ == "__main__":
print(args)
client = Client(host=args.host, port=args.port, user=args.user, password=args.password)
fields = getFields(client)
if len(fields) == 0:
print("Nothing to migrate....")
exit(0)
print("fields from clickhouse -------------------------------------")
print(fields)
print("------------------------------------------------------------\n\n")
con = sqlite3.connect(args.data_source)
print("updating dashboards ----------------------------------------")
updateDashboards(con,fields)
print("\n\nupdating alerts ----------------------------------------")
updateAlerts(con,fields)
print("\n\ncommiting changes --------------------------------------")
con.commit()
con.close()

0 comments on commit 6c8682d

Please sign in to comment.