Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ async def _handle_message(self, message):

except Exception as e:
error_msg = f"Error processing message: {e}"
self._log_debug(
f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] {error_msg}"
)
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
self._log_debug(f"[{timestamp}] {error_msg}")
if self.callback:
await self.callback.on_error(error_msg)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ async def _handle_message(self, message):

except Exception as e:
error_msg = f"Error processing message: {e}"
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
self.ten_env.log_error(
f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] {error_msg}"
f"[{timestamp}] {error_msg}"
)
if self.callback:
await self.callback.on_error(error_msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ async def _handle_message(self, message):

except Exception as e:
error_msg = f"Error processing message: {e}"
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
self.ten_env.log_info(
f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] {error_msg}"
f"[{timestamp}] {error_msg}"
)
await self.callback.on_error(error_msg)

Expand Down
2 changes: 1 addition & 1 deletion packages/core_apps/default_app_cpp/tools/run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def detect_arch() -> str:
def run_cmd(cmd: str) -> int:
"""Run a shell command."""
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True)
result = subprocess.run(cmd, shell=False, check=True)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
if env is None:
env = os_module.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
result = subprocess.run(cmd, shell=False, check=True, env=env)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
if env is None:
env = os.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
result = subprocess.run(cmd, shell=False, check=True, env=env)
return result.returncode


Expand Down
Loading