Search...::Tasks(3pm)

πŸ“¦
version 8.12 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Search...::Tasks β€” the manual, but make it cute ✨

okay bestie, so this is Search::Elasticsearch::Client::8_0::Direct::Tasks, and it's the little client that lets you talk to the Task Management API πŸ’… it's giving "I know what all my Elasticsearch tasks are doing and I'm not afraid to cancel them."

Version: 8.12 πŸŽ€


πŸ’– DESCRIPTION πŸ’–

ngl, this module is literally just here to hand you the methods for the Task Management API β€” stuff like listing your tasks and cancelling your tasks. that's it. that's the job. πŸ¦‹

it does Search::Elasticsearch::Role::Client::Direct, so it inherits all that direct-client behavior, no cap.


🌸 METHODS 🌸

✨ list() ✨

$response = $e->tasks->list(
    task_id => $task_id  # optional
);

okay so list() returns all the running tasks, or β€” plot twist β€” if you pass a task_id, it gives you the info about that one specific task instead πŸ‘‘ so basically it's the "who's doing what rn" method.

Query string parameters, get into it:

  • "actions"
  • "detailed"
  • "error_trace"
  • "group_by"
  • "human"
  • "nodes"
  • "parent_task_id"
  • "timeout"
  • "wait_for_completion"

see the task management docs http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html for more info 🫢


πŸ¦‹ get() πŸ¦‹

$response = $e->tasks->get(
    task_id => $task_id  # required
);

get() returns the task with the specified ID. and bestie, notice the vibe check: task_id is required here, not optional like in list(). no task_id, no task. periodt. πŸ’€

Query string parameters:

  • "error_trace"
  • "human"
  • "wait_for_completion"

see the task management docs http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html for more info 🫢


πŸ’… cancel() πŸ’…

$response = $e->tasks->cancel(
    task_id => $task_id  # required
);

cancel() attempts to cancel the specified task_id β€” or, if you're feeling chaotic, multiple tasks. yeah. it attempts. main character energy, but it's an attempt, so don't come for me 😭

Query string parameters:

  • "actions"
  • "error_trace"
  • "human"
  • "nodes"
  • "parent_task_id"
  • "timeout"

see the task management docs http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html for more info 🫢


🌈 AUTHOR 🌈

Enrico Zimuel <enrico.zimuel@elastic.co> β€” iconic, we love them πŸ’œ


This software is Copyright (c) 2024 by Elasticsearch BV.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

and that's the whole page, bestie!! πŸŽ€ this doc came to you courtesy of perl v5.38.2, dated 2024-02-04, from the Search...::Tasks(3pm) page itself. slay, read responsibly, and go cancel a task (if it's yours) πŸ’–βœ¨

πŸ“¦ where this page comes from