View Source Antikythera.Mix.Task (antikythera v0.5.1)
Helper functions for making mix tasks in gears.
Functions in this module can only be used in mix tasks.
Summary
Functions
Starts the current antikythera instance and its dependency applications without web server functionality.
Set the specified node_id
to the Antikythera.ContextId
in GearLog.
Functions
@spec prepare_antikythera_instance() :: :ok
Starts the current antikythera instance and its dependency applications without web server functionality.
If you need web server functionality in your mix task,
use Application.ensure_all_started(Antikythera.Env.antikythera_instance_name())
.
@spec set_node_id_to_gear_log_context(Antikythera.NodeId.t()) :: :ok
Set the specified node_id
to the Antikythera.ContextId
in GearLog.
If you want to use GearLog in mix task, you must set node_id
before you call GearLog functions.
The Antikythera.ContextId
in GearLog will become {timestamp}_{node_id}_{PID}
.
The timestamp
and PID
are automatically got from system.