Skip to content

Instantly share code, notes, and snippets.

View jmettraux's full-sized avatar

John Mettraux jmettraux

View GitHub Profile
.right {
color: blue;
font-weight: bold;
}
table {
width: 60%;
margin: auto;
border: 1px solid black;
@jmettraux
jmettraux / out.txt
Last active January 7, 2020 08:59
flor hook vs require:
-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch-sch
+ error in Flor::Scheduler#notify
#<NameError: uninitialized constant Flor::PoloZeroHook>
/Users/jmettraux/w/flor/lib/flor/unit/hook.rb:106:in `instantiate'
/Users/jmettraux/w/flor/lib/flor/unit/hook.rb:67:in `class_to_hook'
/Users/jmettraux/w/flor/lib/flor/unit/hook.rb:18:in `to_hook'
/Users/jmettraux/w/flor/lib/flor/core/executor.rb:131:in `collect'
/Users/jmettraux/w/flor/lib/flor/core/executor.rb:131:in `traps_and_hooks'
/Users/jmettraux/w/flor/lib/flor/unit/hooker.rb:65:in `notify'
/Users/jmettraux/w/flor/lib/flor/unit/scheduler.rb:385:in `notify'
class Fugit::Cron
def previous_time(from=::EtOrbi::EoTime.now)
from = ::EtOrbi.make_time(from)
ti = 0
ifrom = from.to_i
t = TimeCursor.new(from.translate(@timezone))
RUBY_VERSION: 1.9.3
RUBY_PLATFORM: i386-mingw32
Rufus::Scheduler::CronLine
Rufus::Scheduler::CronLine
.new
.new
interprets cron strings correctly
interprets cron strings correctly
19:54 puppeh has joined (~puppeh@....gr)
19:55 puppeh: can I ask about rufus-scheduler?
19:58 puppeh: I try to do a :first_in => Time.now but it throws: cannot set first[_at|_in] in the past: 1.0e-07 -> 2014-01-22 10:44:32 +0000 (ArgumentError)
19:58 puppeh: I want to run the job to be run immediately the first time
19:59 jmettraux: puppeh: hello, welcome to #ruote
20:00 jmettraux: if you want it to run immediately, don't set any :first_in
20:01 puppeh: so this: scheduler.every '10s' do
20:01 puppeh: will run immediately the first time and then after each 10" ?
20:02 jmettraux: unfortunately, it will run for the first time after 10 seconds
20:02 puppeh: that's what I'm talking about :P
source 'https://rubygems.org'
gem 'yajl-ruby'
gem 'ruote'
@jmettraux
jmettraux / Gemfile
Last active December 23, 2015 09:49 — forked from ypz/ack.rb
source 'https://rubygems.org'
gem 'yajl-ruby'
gem 'ruote'
def test_update_workitem_alt
@dashboard.register_participant 'alpha', Ruote::StorageParticipant
wfid = @dashboard.launch(Ruote.process_definition { alpha })
wait_for(:alpha)
#wi = @dashboard.process(wfid).workitems.first
#alpha = @dashboard.participant(wi.participant_name)
# Gemfile
#
# ---8<---
# source :rubygems
#
# gem 'yajl-ruby', :require => 'yajl'
# #gem 'ruote'
# gem 'ruote', :git => 'git://github.com/jmettraux/ruote.git'
# --->8---
@jmettraux
jmettraux / out.log
Created April 12, 2013 22:03
ruote-moped run on Ruby 1.9.3-p327, MongoDB 1.4.4-3 on Linux 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
2013-04-13 06:56:27 +0900
using yajl 1.1.0
pid 2760
Run options:
# Running tests:
.............................F...================================================================================
[:dbl, :r, 0, :t, 0]