Flect.Worker

Encapsulates a worker process that invokes a Flect tool and collects its exit code. Can be supervised by an OTP supervisor.

Source

Functions summary

Functions

code_change(_old, state, _extra)

Source

handle_call(arg1, arg2, state)

Source

handle_cast(_msg, state)

Source

handle_info(_msg, state)

Source

init(args)

Source

start_link()

Starts a worker process linked to the parent process. Returns {:ok, pid} on success.

Source

terminate(reason, state)

Source

work(pid, cfg, timeout // :infinity)

Instructs the given worker process to execute a Flect tool as specified by the given configuration. Returns the exit code of the tool.

pid must be the PID of a Flect.Worker process. cfg must be a valid Flect.Config instance. timeout must be :infinity or a millisecond value specifying how much time to wait for the tool to complete.

Source