-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganized code, added code docs and optimized readme
- Loading branch information
Mathias Peter
authored and
Mathias Peter
committed
Jan 20, 2015
1 parent
944a701
commit d55d641
Showing
10 changed files
with
960 additions
and
359 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>example.coffee</title> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
<link rel="stylesheet" media="all" href="../../doc-style.css" /> | ||
<script src="../../doc-filelist.js"></script> | ||
<script> | ||
var relativeDir = "../../", thisFile = "_src/example/example.coffee", defaultSidebar = true; | ||
</script> | ||
<script src="../../doc-script.js"></script> | ||
</head> | ||
<body> | ||
<div id="sidebar_wrapper"> | ||
<div id="sidebar_switch"> | ||
<span class="tree">Files</span> | ||
<span class="headings">Headings</span> | ||
</div> | ||
<div id="tree"></div> | ||
<div id="headings"> | ||
</div> | ||
</div> | ||
<div id="sidebar-toggle"></div> | ||
<div id="container"><div class="background highlight"></div> | ||
<table cellpadding="0" cellspacing="0"> | ||
<tbody> | ||
<tr> | ||
<td class="docs"> | ||
<h1>example.coffee</h1> | ||
</td> | ||
<td class="code highlight"></td> | ||
</tr> | ||
<tr> | ||
<td class="docs"> | ||
<div class="pilwrap"> | ||
<a class="pilcrow" href="#section-1" id="section-1">¶</a> | ||
</div> | ||
|
||
</td> | ||
<td class="code highlight"><div class="highlight"><pre><a class="line-num" href="#line-1" id="line-1">1</a> <span class="nv">RSMQWorker = </span><span class="nx">require</span><span class="p">(</span> <span class="s">"../."</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-2" id="line-2">2</a> <span class="nv">worker = </span><span class="k">new</span> <span class="nx">RSMQWorker</span><span class="p">(</span> <span class="s">"myqueue"</span><span class="p">,</span> <span class="p">{</span> <span class="nv">interval: </span><span class="p">[</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span> <span class="p">]</span> <span class="p">}</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-3" id="line-3">3</a> | ||
<a class="line-num" href="#line-4" id="line-4">4</a> <span class="nx">worker</span><span class="p">.</span><span class="nx">on</span> <span class="s">"message"</span><span class="p">,</span> <span class="nf">( msg, next, id )=></span> | ||
<a class="line-num" href="#line-5" id="line-5">5</a> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span> <span class="s">"RECEIVED"</span><span class="p">,</span> <span class="nx">msg</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-6" id="line-6">6</a> <span class="nx">next</span><span class="p">()</span> | ||
<a class="line-num" href="#line-7" id="line-7">7</a> <span class="k">return</span> | ||
<a class="line-num" href="#line-8" id="line-8">8</a> | ||
<a class="line-num" href="#line-9" id="line-9">9</a> <span class="nx">worker</span><span class="p">.</span><span class="nx">start</span><span class="p">()</span> | ||
<a class="line-num" href="#line-10" id="line-10">10</a> </pre></div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>sender.coffee</title> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
<link rel="stylesheet" media="all" href="../../doc-style.css" /> | ||
<script src="../../doc-filelist.js"></script> | ||
<script> | ||
var relativeDir = "../../", thisFile = "_src/example/sender.coffee", defaultSidebar = true; | ||
</script> | ||
<script src="../../doc-script.js"></script> | ||
</head> | ||
<body> | ||
<div id="sidebar_wrapper"> | ||
<div id="sidebar_switch"> | ||
<span class="tree">Files</span> | ||
<span class="headings">Headings</span> | ||
</div> | ||
<div id="tree"></div> | ||
<div id="headings"> | ||
</div> | ||
</div> | ||
<div id="sidebar-toggle"></div> | ||
<div id="container"><div class="background highlight"></div> | ||
<table cellpadding="0" cellspacing="0"> | ||
<tbody> | ||
<tr> | ||
<td class="docs"> | ||
<h1>sender.coffee</h1> | ||
</td> | ||
<td class="code highlight"></td> | ||
</tr> | ||
<tr> | ||
<td class="docs"> | ||
<div class="pilwrap"> | ||
<a class="pilcrow" href="#section-1" id="section-1">¶</a> | ||
</div> | ||
|
||
</td> | ||
<td class="code highlight"><div class="highlight"><pre><a class="line-num" href="#line-1" id="line-1">1</a> <span class="nv">RSMQWorker = </span><span class="nx">require</span><span class="p">(</span> <span class="s">"../."</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-2" id="line-2">2</a> <span class="nv">worker = </span><span class="k">new</span> <span class="nx">RSMQWorker</span><span class="p">(</span> <span class="s">"myqueue"</span><span class="p">,</span> <span class="nv">autostart: </span><span class="kc">false</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-3" id="line-3">3</a> | ||
<a class="line-num" href="#line-4" id="line-4">4</a> <span class="nx">worker</span><span class="p">.</span><span class="nx">on</span> <span class="s">"ready"</span><span class="p">,</span> <span class="o">=></span> | ||
<a class="line-num" href="#line-5" id="line-5">5</a> <span class="k">for</span> <span class="nx">msg</span> <span class="k">in</span> <span class="s">"ABCDEFGHIJKLMNOPQRSTUVWXYZ"</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span> <span class="s">""</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-6" id="line-6">6</a> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span> <span class="s">"SEND"</span><span class="p">,</span> <span class="nx">msg</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-7" id="line-7">7</a> <span class="nx">worker</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span> <span class="nx">msg</span> <span class="p">)</span> | ||
<a class="line-num" href="#line-8" id="line-8">8</a> <span class="k">return</span> | ||
<a class="line-num" href="#line-9" id="line-9">9</a> </pre></div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.