Skip to content

Async Task Interface for long running functions#410

Open
Tinyblargon wants to merge 7 commits intoTelmate:masterfrom
Tinyblargon:#388-2
Open

Async Task Interface for long running functions#410
Tinyblargon wants to merge 7 commits intoTelmate:masterfrom
Tinyblargon:#388-2

Conversation

@Tinyblargon
Copy link
Copy Markdown
Collaborator

Adds a Task interface that can be used for asynchronously awaiting the completion of the task.

The async part is enabled with the Features.AsyncTask flag in the Client struct.

Resolves #388

Supersedes:
Closes #397
Closes #389

@Tinyblargon Tinyblargon added type/feature Completely new functionality. modifies/go Pull requests that update Go code size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files test/needen This PR has to be tested labels Apr 3, 2025
@Tinyblargon Tinyblargon requested a review from Copilot April 3, 2025 21:19
@Tinyblargon Tinyblargon self-assigned this Apr 3, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

proxmox/vmref.go:18

  • Consider using fmt.Errorf to wrap errors for a more consistent error formatting style when passing context with the error message.
return nil, nil, errors.New(VmRef_Error_Nil)

proxmox/config_qemu_disk.go:913

  • Explicitly return nil for the exitStatus when an error occurs (e.g., 'return nil, err') to avoid relying on implicit zero values from named return parameters.
if err != nil { return }

proxmox/client.go:41

  • [nitpick] Ensure that the Features field is actively utilized to conditionally handle async task flows or consider adding clarifying comments since its purpose is not immediately evident in the current implementation.
Features           *FeatureFlags

@Tinyblargon
Copy link
Copy Markdown
Collaborator Author

@fireflg would this new Task interface work for your use-case? Assuming the feature is enable and the real one is used instead of the dummy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modifies/go Pull requests that update Go code size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files test/needen This PR has to be tested type/feature Completely new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: let user await task completion

2 participants