Skip to content

Instantly share code, notes, and snippets.

@mikewadhera
Created July 12, 2011 22:44
Show Gist options
  • Save mikewadhera/1079168 to your computer and use it in GitHub Desktop.
Save mikewadhera/1079168 to your computer and use it in GitHub Desktop.
~/code/queueable % file_logging? script/console
Loading queueable gem
jruby-1.5.2 :001 > RAILS_ROOT = "."
=> "."
jruby-1.5.2 :002 > class F < Queueable::Tasks
jruby-1.5.2 :003?> self.backend = :file
jruby-1.5.2 :004?> self.queue = "pending/test.log"
jruby-1.5.2 :005?> def echo(arg)
jruby-1.5.2 :006?> puts "****" + arg + "****"
jruby-1.5.2 :007?> end
jruby-1.5.2 :008?> end
=> nil
jruby-1.5.2 :009 > F.fire_echo "HELLO FROM FILE"
=> true
jruby-1.5.2 :010 > F.processor
=> Queueable::File::Processor
jruby-1.5.2 :011 > F.processor.start "config.yml"
Starting Queueable::File::Processor::Delegate File Processor..
[2011-07-12 15:43:25] Pending Directory: ./pending
[2011-07-12 15:43:25] Completed Directory:
[2011-07-12 15:43:25] Failed Directory: ./failed
[2011-07-12 15:43:25] Poll Interval: 30 seconds
[2011-07-12 15:43:25] Processor started. Use Ctrl-C to kill or SIGTERM for graceful shutdown
****HELLO FROM FILE****
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment