Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a62c12d362
Fetching contributors…

Cannot retrieve contributors at this time

462 lines (323 sloc) 27.026 kB
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>PeriodicTimer de EventMachine, le cron simplifié - Shiny happy people coding</title>
<meta name="author" content="Cyril Mougel">
<meta name="description" content="EventMachine est une des meilleures librairies Ruby,
tout en étant une des plus sous-estimées et mal connues. J&#8217;ai donc commencé à regarder un &hellip;">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://blog.shingara.fr/periodictimer-de-eventmachine-le-cron-simplifie.html">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="Shiny happy people coding" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11352302-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">Shiny happy people coding</a></h1>
<h2>Codons avec le sourire</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:blog.shingara.fr" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div>
<article class="hentry" role="article">
<header>
<h1 class="entry-title">PeriodicTimer de EventMachine, le cron simplifié</h1>
<p class="meta">
<time datetime="2010-03-27T00:00:00+01:00" pubdate data-updated="true">Mar 27<span>th</span>, 2010</time>
| <a href="#disqus_thread">Comments</a>
</p>
</header>
<div class="entry-content"><p><a href="http://rubyeventmachine.com/">EventMachine</a> est une des meilleures librairies Ruby,
tout en étant une des plus sous-estimées et mal connues.</p>
<p>J&#8217;ai donc commencé à regarder un peu dans quels cas utiliser EventMachine.
La première application que j&#8217;en ai trouvé c&#8217;est tout simplement le <a href="http://eventmachine.rubyforge.org/EventMachine/PeriodicTimer.html">PeriodicTimer</a>.</p>
<p>Son utilisation la plus simple est le remplacement d&#8217;une cronjob.</p>
<p>Je m&#8217;explique : une cronjob est vraiment une très bonne chose. On peut définir très précisément l&#8217;heure à laquelle on souhaite qu&#8217;une tâche s&#8217;exécute. Celle-ci s&#8217;exécute alors à ce moment précis. Cron est vraiment un outil magnifique. Cependant, dans
le cas d&#8217;une tâche récurrente qui doit être effectuée régulièrement, l&#8217;utilisation d&#8217;un cronjob peut avoir un gros inconvénient.</p>
<p>Cron n&#8217;a aucune gestion de queue. Ainsi on peut se retrouver très simplement avec une quantité astronomique de tâches essayant de s&#8217;exécuter en même temps. Votre « load » explose et il faut redémarrer votre serveur. Bien sûr cela n&#8217;arrive que si vous lancez une tâche plus fréquemment que son temps d&#8217;exécution.</p>
<p>La seule solution serait d&#8217;avoir une petite application - comme : <a href="http://forge.bearstech.com/trac/wiki/JobQueue">jobq</a> - qui gére pour vous un système de queue. Bien sûr, si le fait d&#8217;avoir une queue ne sert strictement à rien, cette solution peut être un peu overkill.</p>
<p>L&#8217;avantage de PeriodicTimer est que les tâches sont exécutées après un temps défini. Il n&#8217;y a aucune gestion d&#8217;heure de lancement. Il y a juste un lancement de la tâche après X secondes une fois que la précédente tâche est finie et qu&#8217;aucune autre tâche ne soit en cours d&#8217;exécution. Cela entraîne effectivement un glissement progressif de l&#8217;heure de lancement. Mais globalement, ça ne pose aucun problème. L&#8217;important est que la tâche soit exécutée régulièrement. C&#8217;est le cas, par exemple dans le cas de récupération de statistique.</p>
<p>Voici <a href="http://gist.github.com/345000">un exemple de code</a> qui utilise
PeriodicTimer</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="nb">require</span> <span class="s1">&#39;eventmachine&#39;</span>
</span><span class='line'><span class="nb">require</span> <span class="s1">&#39;timeout&#39;</span>
</span><span class='line'><span class="no">EventMachine</span><span class="o">.</span><span class="n">run</span> <span class="p">{</span>
</span><span class='line'> <span class="no">EventMachine</span><span class="o">::</span><span class="no">PeriodicTimer</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="k">do</span>
</span><span class='line'> <span class="nb">puts</span> <span class="s2">&quot;</span><span class="si">#{</span><span class="no">Time</span><span class="o">.</span><span class="n">now</span><span class="si">}</span><span class="s2"> : I am 10&quot;</span>
</span><span class='line'> <span class="nb">sleep</span> <span class="mi">10</span>
</span><span class='line'> <span class="k">end</span>
</span><span class='line'>
</span><span class='line'> <span class="no">EventMachine</span><span class="o">::</span><span class="no">PeriodicTimer</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="k">do</span>
</span><span class='line'> <span class="nb">puts</span> <span class="no">Time</span><span class="o">.</span><span class="n">now</span>
</span><span class='line'> <span class="k">end</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p>Voici la sortie qui est effectuée si on lance l&#8217;application pendant 50s.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
<span class='line-number'>27</span>
<span class='line-number'>28</span>
<span class='line-number'>29</span>
<span class='line-number'>30</span>
<span class='line-number'>31</span>
<span class='line-number'>32</span>
<span class='line-number'>33</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="err">$</span> <span class="n">ruby</span> <span class="n">em_periodic</span><span class="o">.</span><span class="n">rb</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">39</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">40</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">41</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">42</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">43</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">44</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">45</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">46</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">47</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">48</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span> <span class="p">:</span> <span class="n">I</span> <span class="n">am</span> <span class="mi">10</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">58</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mo">07</span><span class="p">:</span><span class="mi">59</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">00</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">01</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">02</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">03</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">04</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">05</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mo">06</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">08</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">08</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span> <span class="p">:</span> <span class="n">I</span> <span class="n">am</span> <span class="mi">10</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">18</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">19</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">20</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">21</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">22</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">23</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">25</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">26</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">27</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">28</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span>
</span><span class='line'><span class="no">Fri</span> <span class="no">Mar</span> <span class="mi">26</span> <span class="mi">16</span><span class="p">:</span><span class="mi">08</span><span class="p">:</span><span class="mi">28</span> <span class="o">+</span><span class="mo">0100</span> <span class="mi">2010</span> <span class="p">:</span> <span class="n">I</span> <span class="n">am</span> <span class="mi">10</span>
</span></code></pre></td></tr></table></div></figure>
<p>On peut constater que la tâche qui doit s&#8217;exécuter toutes les
secondes le fait bien. Par contre la tâche qui s&#8217;exécute au bout de 10
secondes effectue un lock sur le thread. Ainsi la tâche qui s&#8217;exécute toutes
les secondes attend que le lock soit libéré. Une fois terminée,
l&#8217;exécution de la tâche toutes les secondes recommence. La tache qui doit s&#8217;exécuter toutes les 10
secondes attendra, quand à elle, 10 nouvelles secondes après avoir été terminée.</p>
<p>C&#8217;est là une grande puissance de PeriodicTimer. On a facilement une succession
de tâche qui ne se marchent jamais sur les pieds. Désormais, je n&#8217;utilise plus que</p>
<p>cette solution pour créer des scripts de récupération de données.</p>
</div>
<footer>
<p class="meta">
<span class="byline author vcard">Posted by <span class="fn">Cyril Mougel</span></span>
<time datetime="2010-03-27T00:00:00+01:00" pubdate data-updated="true">Mar 27<span>th</span>, 2010</time>
</p>
<div class="sharing">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.shingara.fr/periodictimer-de-eventmachine-le-cron-simplifie.html" data-via="shingara" data-counturl="http://blog.shingara.fr/periodictimer-de-eventmachine-le-cron-simplifie.html" >Tweet</a>
<div class="g-plusone" data-size="medium"></div>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
</div>
<p class="meta">
<a class="basic-alignment left" href="/oupsnow-0-5-0-est-sortie.html" title="Previous Post: Oupsnow 0.5.0 est sortie">&laquo; Oupsnow 0.5.0 est sortie</a>
<a class="basic-alignment right" href="/une-journee-dediee-i-mongodb.html" title="Next Post: Une journée dédiée à MongoDB">Une journée dédiée à MongoDB &raquo;</a>
</p>
</footer>
</article>
<section>
<h1>Comments</h1>
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/pourquoi-jai-arrete-decent-exposure.html">pourquoi j'ai arrêté decent_exposure</a>
</li>
<li class="post">
<a href="/tester-ses-vues-rabl.html">tester ses vues rabl</a>
</li>
<li class="post">
<a href="/vundle-ou-le-bundler-de-vim.html">vundle ou le bundler de vim</a>
</li>
<li class="post">
<a href="/dante-pour-mettre-du-daemon-dans-son-code.html">dante pour mettre du daemon dans son code</a>
</li>
<li class="post">
<a href="/moped-le-nouveau-driver-mongodb-pour-ruby.html">moped le nouveau driver mongodb pour ruby</a>
</li>
<li class="post">
<a href="/quiet-assets-le-limiteur-de-log.html">Quiet Assets le gem qui limite les logs</a>
</li>
<li class="post">
<a href="/telecharger-fichier-de-basecamp.html">Récupération de ses fichiers sur basecamp</a>
</li>
<li class="post">
<a href="/translate-on-mongoid.html">Localize avec mongoid</a>
</li>
<li class="post">
<a href="/mailtrap-l-aide-au-staging.html">Mailtrap l'aide au staging</a>
</li>
<li class="post">
<a href="/une-journee-dediee-i-mongodb.html">Une journée dédiée à MongoDB</a>
</li>
</ul>
</section>
<section>
<h1>GitHub Repos</h1>
<ul id="gh_repos">
<li class="loading">Status updating...</li>
</ul>
<a href="https://github.com/shingara">@shingara</a> on GitHub
<script type="text/javascript">
$.domReady(function(){
if (!window.jXHR){
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = '/javascripts/libs/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
github.showRepos({
user: 'shingara',
count: 10,
skip_forks: false,
target: '#gh_repos'
});
});
</script>
<script src="/javascripts/github.js" type="text/javascript"> </script>
</section>
<section>
<h1>Latest Tweets</h1>
<ul id="tweets">
<li class="loading">Status updating...</li>
</ul>
<script type="text/javascript">
$.domReady(function(){
getTwitterFeed("shingara", 4, false);
});
</script>
<script src="/javascripts/twitter.js" type="text/javascript"> </script>
<a href="http://twitter.com/shingara" class="twitter-follow-button" data-show-count="true">Follow @shingara</a>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright &copy; 2012 - Cyril Mougel -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
var disqus_shortname = 'shinydevblog';
// var disqus_developer = 1;
var disqus_identifier = 'http://blog.shingara.fr/periodictimer-de-eventmachine-le-cron-simplifie.html';
var disqus_url = 'http://blog.shingara.fr/periodictimer-de-eventmachine-le-cron-simplifie.html';
var disqus_script = 'embed.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript">
(function() {
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
script.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
})();
</script>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.