### Install Jongleur and Graphviz Source: https://context7.com/redfred7/jongleur/llms.txt Instructions for installing the Jongleur gem and the Graphviz system dependency on Linux and macOS. ```ruby # Add to Gemfile gem 'jongleur' # Install system dependency (Linux) sudo apt-get install graphviz # Install system dependency (Mac OS) brew cask install graphviz ``` -------------------------------- ### Install Jongleur Gem Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This snippet shows how to add the Jongleur gem to your application's Gemfile and install it using Bundler. It also mentions the require statement needed to use the gem. ```ruby gem 'jongleur' # Then execute: # $ bundle # Or install yourself: # $ gem install jongleur # In either case, call require jongleur before using the gem. ``` -------------------------------- ### Jongleur Task Matrix Before Execution Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This example shows the expected format of the Jongleur Task Matrix before any tasks have been executed. It lists tasks with initial states like pid=-1 and running=false. ```text # # # # # ``` -------------------------------- ### Jongleur Task Matrix After Execution Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This example illustrates the Jongleur Task Matrix after Jongleur has finished executing tasks. It displays updated information such as process IDs (pid), exit statuses, completion timestamps, and success statuses. ```text # # # # # ``` -------------------------------- ### Jongleur Status Codes for Task State - Ruby Source: https://context7.com/redfred7/jongleur/llms.txt Illustrates the use of Jongleur's predefined status codes for identifying the state of a task. These constants provide clear indicators for conditions such as a task not yet running, not being found in the task matrix or graph, or having an undetermined success status. The example shows how to check if a task has been executed using its PID and a status code constant. ```ruby require 'jongleur' # Status code constants Jongleur::StatusCodes::PROCESS_NOT_YET_RAN # -1: Task hasn't been executed Jongleur::StatusCodes::TASK_NOT_IN_TASK_MATRIX # -8: Task not found in matrix Jongleur::StatusCodes::TASK_NOT_IN_TASK_GRAPH # -9: Task not in graph Jongleur::StatusCodes::SUCCESS_STATUS_UNDETERMINED # -2: Cannot determine success # Check if a task has run task = API.task_matrix.find { |t| t.name == :MyTask } if task.pid == Jongleur::StatusCodes::PROCESS_NOT_YET_RAN puts "Task has not been executed yet" end ``` -------------------------------- ### Task Struct Attributes and Monitoring - Ruby Source: https://context7.com/redfred7/jongleur/llms.txt Demonstrates the attributes of the `Jongleur::Task` struct, which represents the runtime state of a task. These attributes include name, PID, running status, exit status, finish time, and success status, enabling detailed monitoring of task execution. The example shows how to access and display these attributes within a completed callback. ```ruby require 'jongleur' include Jongleur # Task attributes: # - name: Symbol - the task class name # - pid: Integer - OS process ID (-1 if not yet ran) # - running: Boolean - true if currently executing # - exit_status: Integer/nil - process exit code (0=success, non-zero=error) # - finish_time: Float - completion timestamp (seconds since Epoch) # - success_status: Boolean/nil - true if successful, false if failed, nil if not exited API.add_task_graph({ MyTask: [] }) API.run do |on| on.completed do |task_matrix| task_matrix.each do |task| puts "Task: #{task.name}" puts " Process ID: #{task.pid}" puts " Was Running: #{task.running}" puts " Exit Status: #{task.exit_status}" puts " Success: #{task.success_status}" puts " Completed At: #{Time.at(task.finish_time)}" puts " Duration: calculated from start to finish_time" end end end ``` -------------------------------- ### Get Hung Tasks - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix to find tasks that started execution but did not finish. These are identified by having a valid PID but a nil success status. ```ruby require 'jongleur' include Jongleur API.run do |on| on.completed do |task_matrix| hung = API.hung_tasks(task_matrix) if hung.any? puts "WARNING: #{hung.length} tasks appear to have hung!" hung.each do |task| puts " - #{task.name} (PID: #{task.pid})" end end end end ``` -------------------------------- ### Get Successful Tasks - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix and returns an array of tasks that completed successfully (exit_status=0 and success_status=true). This is useful for reporting on workflow outcomes. ```ruby require 'jongleur' include Jongleur API.add_task_graph({ A: [:B], B: [:C], C: [] }) API.run do |on| on.completed do |task_matrix| successful = API.successful_tasks(task_matrix) puts "#{successful.length} tasks completed successfully:" successful.each do |task| puts " - #{task.name} (PID: #{task.pid})" end end end ``` -------------------------------- ### Jongleur::API.hung_tasks Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix and returns tasks that started but never finished (success_status=nil with a valid PID). ```APIDOC ## Jongleur::API.hung_tasks ### Description Analyzes the Task Matrix and returns all tasks that started but never finished (success_status=nil with valid PID). ### Method POST ### Endpoint /tasks/hung ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_matrix** (Array) - The task matrix to analyze. ### Request Example ```ruby require 'jongleur' include Jongleur API.run do |on| on.completed do |task_matrix| hung = API.hung_tasks(task_matrix) if hung.any? puts "WARNING: #{hung.length} tasks appear to have hung!" hung.each do |task| puts " - #{task.name} (PID: #{task.pid})" end end end end ``` ### Response #### Success Response (200) - **hung_tasks** (Array) - An array of task states for tasks that are considered hung. #### Response Example ```json [ { "name": "TaskC", "pid": 12347, "running": true, "exit_status": null, "finish_time": null, "success_status": null } ] ``` ``` -------------------------------- ### Get Task Graph - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Returns the current task graph as a hash, mapping task names to their dependent tasks. This function is useful for understanding the workflow structure and dependencies between tasks. ```ruby require 'jongleur' include Jongleur graph = { Extract: [:Transform], Transform: [:Load], Load: [] } API.add_task_graph(graph) current_graph = API.task_graph # => {:Extract=>[:Transform], :Transform=>[:Load], :Load=>[]} current_graph.each do |task, dependents| if dependents.empty? puts "#{task} is a terminal task" else puts "#{task} -> #{dependents.join(', ')}" end end ``` -------------------------------- ### Get Not Ran Tasks - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Identifies and returns tasks from the Task Matrix that were never executed, typically because a preceding task failed. This is crucial for understanding workflow interruptions. ```ruby require 'jongleur' include Jongleur API.run do |on| on.completed do |task_matrix| not_ran = API.not_ran_tasks(task_matrix) if not_ran.any? puts "The following tasks did not run:" not_ran.each do |task| puts " - #{task.name}" end end end end ``` -------------------------------- ### Get Predecessor Task PIDs - Ruby Source: https://context7.com/redfred7/jongleur/llms.txt Retrieves the process IDs (PIDs) of all predecessor tasks for a given task. This is useful for inter-task data sharing, where data can be keyed by the PID of the task that produced it. It requires the 'jongleur' gem and uses the `Jongleur::API.get_predecessor_pids` method. ```ruby require 'jongleur' include Jongleur class Transform < Jongleur::WorkerTask def execute # Get PIDs of predecessor tasks predecessor_pids = API.get_predecessor_pids(:Transform) puts "Predecessor PIDs: #{predecessor_pids.inspect}" # Use PIDs to retrieve data saved by predecessors predecessor_pids.each do |pid| data = Redis.get("task_output:#{pid}") process_data(data) if data end 'Transform complete' end end API.add_task_graph({ Extract: [:Transform], Transform: [] }) API.run { |on| on.completed { puts "Done" } } ``` -------------------------------- ### Get Task Matrix State - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Retrieves the current state of all tasks in the workflow. The matrix includes task name, PID, running status, exit status, finish timestamp, and success status. Useful for monitoring task execution before and after running the workflow. ```ruby require 'jongleur' include Jongleur graph = { A: [:B], B: [] } API.add_task_graph(graph) # Before execution matrix = API.task_matrix matrix.each do |task| puts "Task: #{task.name}" puts " PID: #{task.pid}" # -1 (not yet ran) puts " Running: #{task.running}" # false puts " Exit Status: #{task.exit_status}" # nil puts " Success: #{task.success_status}" # nil end # After execution (in completed callback) API.run do |on| on.completed do |final_matrix| final_matrix.each do |task| puts "Task #{task.name}: PID=#{task.pid}, " \ "exit=#{task.exit_status}, success=#{task.success_status}, " \ "finished_at=#{Time.at(task.finish_time)}" end end end ``` -------------------------------- ### Get Failed Tasks - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix and returns an array of tasks that failed (success_status=false). This function helps in identifying and debugging issues within a workflow. ```ruby require 'jongleur' include Jongleur class FailingTask < Jongleur::WorkerTask def execute raise "Intentional failure" end end class DependentTask < Jongleur::WorkerTask def execute 'This will not run' end end API.add_task_graph({ FailingTask: [:DependentTask], DependentTask: [] }) API.run do |on| on.completed do |task_matrix| failed = API.failed_tasks(task_matrix) if failed.any? puts "WARNING: #{failed.length} tasks failed!" failed.each do |task| puts " - #{task.name} (exit_status: #{task.exit_status})" end end end end ``` -------------------------------- ### Run Workflow and Handle Completion in Jongleur Source: https://context7.com/redfred7/jongleur/llms.txt Demonstrates how to execute a task graph using `Jongleur::API.run` and define a completion callback. The callback receives the final Task Matrix and can be used to analyze results, such as identifying successful and failed tasks, and printing tasks in completion order. ```ruby require 'jongleur' include Jongleur # Define tasks class TaskA < Jongleur::WorkerTask def execute sleep 1 'TaskA done' end end class TaskB < Jongleur::WorkerTask def execute sleep 2 'TaskB done' end end class TaskC < Jongleur::WorkerTask def execute sleep 1 'TaskC done' end end # Define graph where A and B run in parallel, then C runs after both complete graph = { TaskA: [:TaskC], TaskB: [:TaskC], TaskC: [] } API.add_task_graph(graph) # Run workflow with completion callback API.run do |on| on.completed do |task_matrix| puts "Workflow completed!" # Analyze results successful = API.successful_tasks(task_matrix) failed = API.failed_tasks(task_matrix) puts "Successful tasks: #{successful.map(&:name).join(', ')}" puts "Failed tasks: #{failed.map(&:name).join(', ')}" if failed.any? # Print tasks in completion order task_matrix.sort_by(&:finish_time).each do |task| puts "#{task.name}: PID=#{task.pid}, exit=#{task.exit_status}" end end end # Output: # Starting workflow... # starting task TaskA # starting task TaskB # finished task: TaskA, process: 12345, exit_status: 0, success: true # finished task: TaskB, process: 12346, exit_status: 0, success: true # starting task TaskC ``` -------------------------------- ### Print Task Graph to PDF - Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Generates a visual representation of the task graph as a PDF file using Graphviz. An optional directory path can be provided to specify the output location; otherwise, it defaults to the current directory. ```ruby require 'jongleur' include Jongleur graph = { A: [:C, :D], B: [:D, :E], C: [:F], D: [:F], E: [], F: [] } API.add_task_graph(graph) # Print to /tmp directory pdf_path = API.print_graph('/tmp') puts "Graph saved to: #{pdf_path}" # => Graph saved to: /tmp/jongleur_graph_01052019_143022.pdf # Print to current directory (default) pdf_path = API.print_graph puts "Graph saved to: #{pdf_path}" ``` -------------------------------- ### Jongleur::API.print_graph Source: https://context7.com/redfred7/jongleur/llms.txt Generates a visual representation of the task graph as a PDF file using Graphviz. An optional directory path can be provided. ```APIDOC ## Jongleur::API.print_graph ### Description Generates a visual representation of the task graph as a PDF file using Graphviz. Accepts an optional directory path parameter. ### Method GET ### Endpoint /print_graph ### Parameters #### Path Parameters None #### Query Parameters - **directory** (String) - Optional. The directory path where the PDF should be saved. Defaults to the current directory. #### Request Body None ### Request Example ```ruby require 'jongleur' include Jongleur graph = { A: [:C, :D], B: [:D, :E], C: [:F], D: [:F], E: [], F: [] } API.add_task_graph(graph) # Print to /tmp directory pdf_path = API.print_graph('/tmp') puts "Graph saved to: #{pdf_path}" # => Graph saved to: /tmp/jongleur_graph_01052019_143022.pdf # Print to current directory (default) pdf_path = API.print_graph puts "Graph saved to: #{pdf_path}" ``` ### Response #### Success Response (200) - **pdf_path** (String) - The absolute path to the generated PDF file. #### Response Example ```json { "pdf_path": "/tmp/jongleur_graph_01052019_143022.pdf" } ``` ``` -------------------------------- ### Generate Graphical Representation of Task Graph in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Generates a PDF representation of the defined task graph and saves it to a specified directory. This is useful for visualizing the workflow dependencies. ```ruby API.print_graph('/tmp') ``` -------------------------------- ### Run Jongleur Workflow with Completion Callback in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Executes the defined task graph using Jongleur and registers a callback to be executed upon completion of all tasks. The callback receives the final task matrix. ```ruby API.run do |on| on.completed { |task_matrix| puts "Done!"} end ``` -------------------------------- ### Define WorkerTask for Jongleur Source: https://context7.com/redfred7/jongleur/llms.txt Demonstrates how to create custom tasks by inheriting from Jongleur::WorkerTask and implementing the `execute` method. The `execute` method contains the task's logic and can access predecessor process IDs via the `@predecessors` instance variable. ```ruby require 'jongleur' class ExtractData < Jongleur::WorkerTask @desc = 'Extract data from source database' def execute # Access predecessor process IDs via @predecessors instance variable puts "Predecessors: #{@predecessors.inspect}" # Perform task work sleep 2 data = fetch_from_database save_to_temp_storage(data) 'ExtractData completed successfully' end end class TransformData < Jongleur::WorkerTask @desc = 'Transform extracted data' def execute sleep 1 'TransformData completed' end end class LoadData < Jongleur::WorkerTask @desc = 'Load transformed data to target' def execute sleep 1 'LoadData completed' end end ``` -------------------------------- ### Jongleur::API.task_graph Source: https://context7.com/redfred7/jongleur/llms.txt Retrieves the current task graph, showing task names and their dependencies. ```APIDOC ## Jongleur::API.task_graph ### Description Returns the current task graph hash showing task names and their dependent tasks. ### Method GET ### Endpoint /task_graph ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```ruby require 'jongleur' include Jongleur graph = { Extract: [:Transform], Transform: [:Load], Load: [] } API.add_task_graph(graph) current_graph = API.task_graph # => {:Extract=>[:Transform], :Transform=>[:Load], :Load=>[]} current_graph.each do |task, dependents| if dependents.empty? puts "#{task} is a terminal task" else puts "#{task} -> #{dependents.join(', ')}" end end ``` ### Response #### Success Response (200) - **graph** (Hash>) - A hash where keys are task names and values are arrays of dependent task names. #### Response Example ```json { "Extract": ["Transform"], "Transform": ["Load"], "Load": [] } ``` ``` -------------------------------- ### Add Task Graph to Jongleur API Source: https://context7.com/redfred7/jongleur/llms.txt Shows how to define and add a task graph to Jongleur using `Jongleur::API.add_task_graph`. This method accepts a hash where keys are task class names (Symbols) and values are arrays of dependent task names. It initializes the Task Matrix and validates the graph structure. ```ruby require 'jongleur' include Jongleur # Define ETL workflow: Extract -> Transform -> Load etl_graph = { ExtractData: [:TransformData], TransformData: [:LoadData], LoadData: [] } # Add task graph - returns the initialized Task Matrix task_matrix = API.add_task_graph(etl_graph) # => [ # #, # #, # # # ] # Complex DAG with parallel branches complex_graph = { A: [:C, :D], # A must finish before C and D can start B: [:D, :E], # B must finish before D and E can start C: [:F], # C must finish before F can start D: [:F], # D must finish before F can start (waits for both A and B) E: [], # E has no dependents F: [] # F has no dependents (waits for both C and D) } API.add_task_graph(complex_graph) ``` -------------------------------- ### Loading Jongleur Task Matrix from JSON Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Jongleur serializes the Task Matrix to a time-stamped JSON file in the `/tmp` directory. This JSON file can be loaded and parsed using Ruby's built-in JSON library for programmatic analysis. ```Ruby require 'json' task_matrix_data = JSON.parse( File.read('/tmp/jongleur_task_matrix_08272018_103406.json') ) ``` -------------------------------- ### Implement a Jongleur Worker Task in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Shows how to implement a custom task for Jongleur. Tasks should inherit from Jongleur::WorkerTask and define an 'execute' method, which contains the task's logic. The '@desc' attribute can be used for task description. ```ruby class A < Jongleur::WorkerTask @desc = 'this is task A' def execute sleep 1 # do something 'A is running... ' end end ``` -------------------------------- ### Define and Add Task Graph in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Defines a task graph as a Ruby hash and adds it to Jongleur's API. The task graph represents dependencies between tasks, where each task corresponds to a Ruby class with an 'execute' method. Jongleur visualizes this graph. ```ruby test_graph = { A: [:B, :C], B: [:D], C: [:D], D: [:E], E: [] } API.add_task_graph test_graph ``` -------------------------------- ### Jongleur::API.task_matrix Source: https://context7.com/redfred7/jongleur/llms.txt Retrieves the current Task Matrix, providing the state of all tasks including name, PID, running status, exit status, finish timestamp, and success status. ```APIDOC ## Jongleur::API.task_matrix ### Description Returns the current Task Matrix containing the state of all tasks. Each task entry includes name, process ID, running status, exit status, finish timestamp, and success status. ### Method GET ### Endpoint /task_matrix ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```ruby require 'jongleur' include Jongleur graph = { A: [:B], B: [] } API.add_task_graph(graph) # Before execution matrix = API.task_matrix matrix.each do |task| puts "Task: #{task.name}" puts " PID: #{task.pid}" # -1 (not yet ran) puts " Running: #{task.running}" # false puts " Exit Status: #{task.exit_status}" # nil puts " Success: #{task.success_status}" # nil end ``` ### Response #### Success Response (200) - **matrix** (Array) - An array of task states. #### Response Example ```json [ { "name": "TaskA", "pid": -1, "running": false, "exit_status": null, "finish_time": null, "success_status": null } ] ``` ``` -------------------------------- ### Jongleur Task Matrix Analysis API Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md After Jongleur completes its tasks, the `completed` callback enables several API methods to analyze the Task Matrix. These methods allow for quick categorization of tasks based on their execution outcome. ```Ruby API::successful_tasks API::failed_tasks API::not_ran_tasks API::hung_tasks ``` -------------------------------- ### Define Task Graph in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This Ruby code defines a task graph using a Hash, where keys represent task class names and values are arrays of dependent task names. It illustrates how to represent task precedence for Jongleur. ```ruby my_graph = { A: [:C, :D], B: [:D, :E], D: [:F, :G], E: [], C: [], G: [:I], H: [:I], F: [], I: [] } ``` -------------------------------- ### Invoke Jongleur Task Matrix Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This code snippet demonstrates how to invoke the Jongleur API to retrieve the current task matrix. The task matrix provides a tabular, real-time view of task execution states. ```ruby Jongleur::API.task_matrix ``` -------------------------------- ### WorkerTask Implementation Template Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This Ruby code defines the base structure for a Jongleur Task. Developers must create classes that inherit from WorkerTask and implement the 'execute' method, which contains the task's core logic to be run by Jongleur. ```ruby class WorkerTask def execute # Task logic goes here end end ``` -------------------------------- ### Retrieve Predecessor Task PIDs in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Provides a method to retrieve the process IDs (PIDs) of predecessor tasks within a Jongleur workflow. This is useful for sharing data between tasks via external storage. ```ruby API.get_predecessor_pids ``` -------------------------------- ### Task Graph Hash Override Behavior in Ruby Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md This Ruby code demonstrates how duplicate keys in a task graph Hash are handled by Jongleur. The later assignment for a key overrides previous ones, emphasizing the need to list all dependencies in a single array. ```ruby my_task_graph = { A: [:B, :C], B: [:D] } # is re-defined as my_task_graph = { A: [:B], A: [:C], B: [:D] } # The 2nd assignment of `A` will override the first one so your graph will be: # {:A=>[:C], :B=>[:D]} # Always assign all dependent tasks together in a single list. ``` -------------------------------- ### Jongleur::API.failed_tasks Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix and returns all tasks that failed (success_status=false). ```APIDOC ## Jongleur::API.failed_tasks ### Description Analyzes the Task Matrix and returns all tasks that failed (success_status=false). ### Method POST ### Endpoint /tasks/failed ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_matrix** (Array) - The task matrix to analyze. ### Request Example ```ruby require 'jongleur' include Jongleur class FailingTask < Jongleur::WorkerTask def execute raise "Intentional failure" end end class DependentTask < Jongleur::WorkerTask def execute 'This will not run' end end API.add_task_graph({ FailingTask: [:DependentTask], DependentTask: [] }) API.run do |on| on.completed do |task_matrix| failed = API.failed_tasks(task_matrix) if failed.any? puts "WARNING: #{failed.length} tasks failed!" failed.each do |task| puts " - #{task.name} (exit_status: #{task.exit_status})" end end end end ``` ### Response #### Success Response (200) - **failed_tasks** (Array) - An array of task states for failed tasks. #### Response Example ```json [ { "name": "FailingTask", "pid": 12346, "running": false, "exit_status": 1, "finish_time": 1678886401, "success_status": false } ] ``` ``` -------------------------------- ### Jongleur::API.successful_tasks Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix and returns all tasks that completed successfully (exit_status=0 and success_status=true). ```APIDOC ## Jongleur::API.successful_tasks ### Description Analyzes the Task Matrix and returns all tasks that ran successfully (exit_status=0 and success_status=true). ### Method POST ### Endpoint /tasks/successful ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_matrix** (Array) - The task matrix to analyze. ### Request Example ```ruby require 'jongleur' include Jongleur API.add_task_graph({ A: [:B], B: [:C], C: [] }) API.run do |on| on.completed do |task_matrix| successful = API.successful_tasks(task_matrix) puts "#{successful.length} tasks completed successfully:" successful.each do |task| puts " - #{task.name} (PID: #{task.pid})" end end end ``` ### Response #### Success Response (200) - **successful_tasks** (Array) - An array of task states for successfully completed tasks. #### Response Example ```json [ { "name": "TaskA", "pid": 12345, "running": false, "exit_status": 0, "finish_time": 1678886400, "success_status": true } ] ``` ``` -------------------------------- ### Accessing Task Status Information in Jongleur Source: https://gitlab.com/redfred7/jongleur/-/blob/master/README.md Jongleur differentiates between `exit_status` and `success_status` for tasks. `exit_status` reflects the raw exit code, while `success_status` indicates if the task completed without error. This distinction is crucial for understanding task outcomes. ```Ruby # Accessing exit status exit_status = task.exit_status # Accessing success status success = task.success_status ``` -------------------------------- ### Jongleur::API.not_ran_tasks Source: https://context7.com/redfred7/jongleur/llms.txt Analyzes the Task Matrix and returns tasks that were never executed, typically due to predecessor failures. ```APIDOC ## Jongleur::API.not_ran_tasks ### Description Analyzes the Task Matrix and returns all tasks that were never executed (typically due to failed predecessor tasks). ### Method POST ### Endpoint /tasks/not_ran ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_matrix** (Array) - The task matrix to analyze. ### Request Example ```ruby require 'jongleur' include Jongleur API.run do |on| on.completed do |task_matrix| not_ran = API.not_ran_tasks(task_matrix) if not_ran.any? puts "The following tasks did not run:" not_ran.each do |task| puts " - #{task.name}" end end end end ``` ### Response #### Success Response (200) - **not_ran_tasks** (Array) - An array of task states for tasks that were not executed. #### Response Example ```json [ { "name": "DependentTask", "pid": -1, "running": false, "exit_status": null, "finish_time": null, "success_status": null } ] ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.