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 check for existing SFTP handler #76

Merged
merged 1 commit into from
Jul 11, 2024
Merged
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
7 changes: 6 additions & 1 deletion src/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ func main() {
slog.Error("ope, failed to create sftp handler", slog.Any(utils.ErrorKey, err))
// Don't return, we want to let things keep going for now
}

defer sftpHandler.Close()

sftpHandler.CopyFiles()
// TODO - Refactor when we have an answer for the SFTP subfolders and timer trigger is properly set up
// TODO - Consider moving unzipping from SFTP handler to a more appropriate place
if err == nil {
sftpHandler.CopyFiles()
}

// ListenToQueue is not split into a separate Go Routine since it is the core driver of the application
queueHandler.ListenToQueue()
Expand Down