View Source Gitly.Task (gitly v0.1.0)

A struct to represent a task.

Summary

Functions

Link to this function

run(task, timeout \\ 5000)

View Source
@spec run(
  %Gitly.Task{error: term(), label: term(), result: term(), task: term()},
  number()
) ::
  %Gitly.Task{error: term(), label: term(), result: term(), task: term()}
@spec run_all_tasks([
  %Gitly.Task{error: term(), label: term(), result: term(), task: term()}
]) :: map()

Run all tasks asynchronously.

Link to this function

run_until_error(tasks, timeout \\ 5000)

View Source
@spec run_until_error(
  [%Gitly.Task{error: term(), label: term(), result: term(), task: term()}],
  number()
) :: map()

Run all tasks but stop when an error occurs.

Link to this function

run_until_success(tasks, timeout \\ 5000)

View Source
@spec run_until_success(
  [%Gitly.Task{error: term(), label: term(), result: term(), task: term()}],
  number()
) :: map()

Run tasks one by one and stop when a task succeeds.

Link to this function

update_result(t, result)

View Source