code_corps v0.0.1 CodeCorps.GitHub.Event View Source

In charge of marking GithubEvent records as “processing”, “processed” or “errored”, based on the outcome of processing a webhook event payload.

Link to this section Summary

Functions

Sets record status to “processing”, marking it as being processed at this moment. Our webhook handling should skip processing payloads for events which are already being processed

Sets record status to “processed” or “errored” based on the first element of first argument, which is the result tuple. The first element of the result tuple should always be either :ok, or :error. Any number of elements in the tuple is suported

Link to this section Types

Link to this type result() View Source
result() :: {:ok, any()} | {:error, atom()} | {:error, atom(), any()}

Link to this section Functions

Link to this function start_processing(event) View Source
start_processing(CodeCorps.GithubEvent.t()) :: {:ok, CodeCorps.GithubEvent.t()}

Sets record status to “processing”, marking it as being processed at this moment. Our webhook handling should skip processing payloads for events which are already being processed.

Link to this function stop_processing(arg, event) View Source
stop_processing(result(), CodeCorps.GithubEvent.t()) :: {:ok, CodeCorps.GithubEvent.t()}

Sets record status to “processed” or “errored” based on the first element of first argument, which is the result tuple. The first element of the result tuple should always be either :ok, or :error. Any number of elements in the tuple is suported.