Skip to content

Commit

Permalink
create fg json use resource name
Browse files Browse the repository at this point in the history
  • Loading branch information
chengaofei committed Dec 13, 2024
1 parent d74bb75 commit 170eae0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tzrec/tools/create_fg_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@
reserves.append(column.strip())
fg_json["reserves"] = reserves

fg_resource_name = args.fg_resource_name
fg_path = os.path.join(args.fg_output_dir, fg_resource_name)
fg_name = args.fg_resource_name if args.fg_resource_name else "fg.json"
fg_path = os.path.join(args.fg_output_dir, fg_name)
with open(fg_path, "w") as f:
json.dump(fg_json, f, indent=4)

project = args.odps_project_name
fg_resource_name = args.fg_resource_name
if project is not None and fg_resource_name is not None:
account, odps_endpoint = _create_odps_account()
o = ODPS(
Expand Down

0 comments on commit 170eae0

Please sign in to comment.