Skip to content

fix error when image doesn't contain nc#28

Merged
ovvesley merged 2 commits intomainfrom
fix_issue_25
Aug 7, 2025
Merged

fix error when image doesn't contain nc#28
ovvesley merged 2 commits intomainfrom
fix_issue_25

Conversation

@RaphaelRGarcia
Copy link
Copy Markdown
Collaborator

No description provided.

func (m *MakeK8sActivityService) addCommandToMonitorFilesStorage(command string, path string) string {
port := m.getPortAkoFlowServer()
command += `ls -lR $ACTIVITY_MOUNT_PATH > /tmp/du_output.txt; echo "Preparing to start request"; body=$(cat /tmp/du_output.txt); body_length=$(printf %s "$body" | wc -c); echo "Start request"; { echo -ne "POST /akoflow-server/internal/storage/` + path + `/?activityId=$ACTIVITY_ID HTTP/1.1\r\n"; echo -ne "Host: $AKOFLOW_SERVER_SERVICE_SERVICE_HOST\r\n"; echo -ne "Content-Type: text/plain\r\n"; echo -ne "Content-Length: $body_length\r\n"; echo -ne "Connection: close\r\n"; echo -ne "\r\n"; echo -ne "$body"; } | nc $AKOFLOW_SERVER_SERVICE_SERVICE_HOST ` + port + `; echo "End request"; `
scriptPath := "/app/pkg/server/scripts/monitor_files_storage.sh"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

to pensando em colocar o caminho do github aqui

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use o

func (u *UtilsReadFile) ReadFile(filePath string) string {

Ele é um utilitario para ler arquivo.
Tenta evitar código duplicado.

Para replace de variaveis use

#VAR1#
ai tu faz o replace.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

foi

@RaphaelRGarcia RaphaelRGarcia requested a review from ovvesley July 29, 2025 22:23
Copy link
Copy Markdown
Collaborator

@ovvesley ovvesley left a comment

Choose a reason for hiding this comment

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

Muito bom!
Tratou para os tipos de maquinas. Excelente.
Faz essas leves correções ai, vou mergear.

@RaphaelRGarcia RaphaelRGarcia requested a review from ovvesley August 7, 2025 20:32
@ovvesley
Copy link
Copy Markdown
Collaborator

ovvesley commented Aug 7, 2025

Vlw!! Enviando para main!

@ovvesley ovvesley merged commit c402a89 into main Aug 7, 2025
@ovvesley ovvesley deleted the fix_issue_25 branch August 30, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants