Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Teingi committed Jul 18, 2024
1 parent 8b1b275 commit 1ccf298
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions handler/gather/gather_plan_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def report_schema(self, sql, tenant_name):
handler.handle()
except Exception as e:
pass
table_info_file = os.path.join(self.local_stored_path, "obdiag_tabledump_result_{0}.txt".format(self.gather_timestamp))
self.stdio.print("table info file path:{0}".format(table_info_file))
table_info_file = os.path.join(self.local_stored_path, "obdiag_tabledump_result_{0}.txt".format(TimeUtils.timestamp_to_filename_time(self.gather_timestamp)))
self.stdio.verbose("table info file path:{0}".format(table_info_file))
table_info = self.get_table_info(table_info_file)
if table_info:
schemas = schemas + "<pre style='margin:20px;border:1px solid gray;'>%s</pre>" % table_info
Expand Down
6 changes: 3 additions & 3 deletions handler/gather/gather_tabledump.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ def init(self):
self.table = Util.get_option(options, 'table')
user = Util.get_option(options, 'user')
password = Util.get_option(options, 'password')
if not (self.database and self.table and user):
self.stdio.error("option --database/--table/--user not found, please provide")
return False
store_dir_option = Util.get_option(options, 'store_dir')
if store_dir_option is not None and store_dir_option != './':
if not os.path.exists(os.path.abspath(store_dir_option)):
Expand All @@ -81,6 +78,9 @@ def init(self):
password = self.context.get_variable("gather_password")
if self.context.get_variable("store_dir", None):
self.store_dir = self.context.get_variable("store_dir")
if not (self.database and self.table and user):
self.stdio.error("option --database/--table/--user not found, please provide")
return False
if self.context.get_variable("gather_tenant_name", None):
self.tenant_name = self.context.get_variable("gather_tenant_name")
else:
Expand Down

0 comments on commit 1ccf298

Please sign in to comment.