mix helpers.task_helper (tango v0.1.2)

Copy Markdown View Source

Helper functions for Tango Mix tasks.

Provides utilities for starting required applications and dependencies in Mix task contexts.

Summary

Functions

Ensures HTTP-only dependencies are started for catalog operations.

Ensures the configured Ecto repository is started.

Ensures all required applications and dependencies are started for Tango Mix tasks.

Functions

ensure_http_started()

Ensures HTTP-only dependencies are started for catalog operations.

This includes:

  • HTTP client dependencies (:req and its dependencies)
  • Tango application (for vault and other services)

Does not start database dependencies, making it safe for HTTP-only operations.

ensure_repo_started()

Ensures the configured Ecto repository is started.

Safe to call multiple times - handles already started repos gracefully.

ensure_started()

Ensures all required applications and dependencies are started for Tango Mix tasks.

This includes:

  • HTTP client dependencies (:req and its dependencies)
  • Tango application (for vault and other services)
  • Database repository (if configured)