Skip to content

Instantly share code, notes, and snippets.

View bcat-eu's full-sized avatar

Yuriy Davats bcat-eu

View GitHub Profile
@bcat-eu
bcat-eu / time.ex
Last active October 10, 2016 16:36
Current time helper module for Elixir
defmodule Util.Time do
@moduledoc """
Time helper functions.
"""
@doc """
Get current time as string using Erlangs calendar module.
"""
@spec now_to_string() :: String.t
def now_to_string() do
def crawl(config) do
config
|> Enum.map(&Task.Supervisor.async(TaskModule, fn() -> check(&1) end))
|> Enum.map(&Task.await(&1))
end