MCPcopy Create free account
hub / github.com/algolia/cli / CancelTask

Method CancelTask

api/crawler/client.go:341–350  ·  view source on GitHub ↗

CancelTask cancels a blocking task.

(crawlerID, taskID string)

Source from the content-addressed store, hash-verified

339
340// CancelTask cancels a blocking task.
341func (c *Client) CancelTask(crawlerID, taskID string) error {
342 path := fmt.Sprintf("crawlers/%s/tasks/%s/cancel", crawlerID, taskID)
343
344 err := c.request(nil, http.MethodPost, path, nil, nil)
345 if err != nil {
346 return err
347 }
348
349 return nil
350}

Callers 1

runUnblockCmdFunction · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected