unless defined? $__rq_snapshotter__ module RQ #{{{ LIBDIR = File::dirname(File::expand_path(__FILE__)) + File::SEPARATOR unless defined? LIBDIR require LIBDIR + 'mainhelper' class Snapshotter < MainHelper #{{{ def snapshot #{{{ set_q qtmp = @argv.shift raise "<#{ qtmp }> exists" if qtmp and test(?e, qtmp) qss = @q.snapshot qtmp, @options['retries'] info{ "created q snapshot <#{ qtmp }>" } #}}} end #}}} end # class Snapshotter #}}} end # module RQ $__rq_snapshotter__ = __FILE__ end