Created
March 25, 2015 14:03
-
-
Save jesteracer/5202e7b83fb3730ee857 to your computer and use it in GitHub Desktop.
gen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Themost.RateWorker do | |
| use GenServer | |
| def start_link do | |
| :gen_server.start_link({ :local, :NAME }, __MODULE__, ARG, []) | |
| end | |
| def init do | |
| IO.puts "Init" | |
| :timer.send_interval(:crowl, 15000) | |
| end | |
| def handle_info(:crawl, _) do | |
| IO.puts "Crawl" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can be this as well: