Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Formatting #28

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Add Formatting #28

wants to merge 11 commits into from

Conversation

JKTUNING
Copy link
Member

@JKTUNING JKTUNING commented Jan 20, 2024

This PR add formatting standards to the project to help with maintainability, along with a few other additions.

  • Add formatting with prettier

    • Add prettierrc.json and ignore files
  • Fix config file creation if file does not exist

  • Changed the shell.exec command to use the full path to the binary (/usr/local/bin/flux-cli) to fix issues where flux-cli is returning an error.

    • Added error handling and error logging to better evaluate this behavior.
    • Future plans to try flux-cli/fluxbenchmark-cli and if this fails then fallback to trying to use the full path to the binary.
  • Remove KDA checks and unused packages

    • Remove axios and https packages
    • Remove KDA functions and unused variables

- Add formatting with prettier
  - Add prettierrc.json and ignore files
- Remove Sleep package and use shell.exec('sleep x') instead
- Fix config file creation if file does not exist
@JKTUNING JKTUNING added the enhancement New feature or request label Jan 20, 2024
Copy link
Member

@Cabecinha84 Cabecinha84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

watchdog.js Outdated
@@ -165,75 +152,71 @@ return;
var msg_text = 'KDA node sync freez detected!';
await send_telegram_msg(emoji_title,info_type,field_type,msg_text,label);*/

sleep.sleep(3);
shell.exec("sleep 3");
Copy link
Member

@Cabecinha84 Cabecinha84 Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure If I am a big fun of this change.
I think I prefered old sleep lib, instead of calling shell to sleep :)

@Cabecinha84
Copy link
Member

Version needs to be bumped before it's merged.
@XK4MiLX @JKTUNING

- Remove KDA checks and functions
- Remove unused packages (axios and https)
- Remove unused variables

Favor sleep package instead of shell.exec
@JKTUNING
Copy link
Member Author

I added the sleep package back and changed all sleep commands to use it, instead of shell.exec

I had also discussed with @XK4MiLX, about removing KDA checks from watchdog so those functions are now removed, along with unused packages and variables.

Version is not bumped yet.

@Cabecinha84
Copy link
Member

If the kda checks works they should remain, as we still run some kda infrastructure that is used on Zelcore.

@XK4MiLX
Copy link
Member

XK4MiLX commented Jan 22, 2024

If the kda checks works they should remain, as we still run some kda infrastructure that is used on Zelcore.

That part of code do nathing continer name are diff and chainwebdata using separate component
problem with kadena node freezing was "youth problems" + fdm have build own check

@Cabecinha84
Copy link
Member

@XK4MiLX what is the state of this PR? Can the version be bumped and after merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants