Skip to content

Instantly share code, notes, and snippets.

John Mettraux jmettraux

Block or report user

Report or block jmettraux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fugit_gh15_patch0.rb
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))
View out.txt
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
View so21280870.txt
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
View Gemfile
source 'https://rubygems.org'
gem 'yajl-ruby'
gem 'ruote'
View Gemfile
source 'https://rubygems.org'
gem 'yajl-ruby'
gem 'ruote'
View ft_20.rb
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)
View cron.rb
# 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 Apr 12, 2013
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
View out.log
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]
View on_msg.rb
# The context will call this method for each msg sucessfully processed
# by the worker.
#
def on_msg(msg)
puts(fancy_print(msg, @noisy)) if @noisy
return if msg['action'] == 'noop'
@on_msg_mutex.synchronize do
You can’t perform that action at this time.