Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Setup rake tasks to run the qless worker and server.

  • Loading branch information...
commit 64390b825cace2a4169e66e1e26d65e3e8cd8aac 1 parent b97f36f
@myronmarston myronmarston authored
View
1  .gitignore
@@ -17,3 +17,4 @@ test/version_tmp
tmp
bundle
+config/redis_connection_url.txt
View
20 Rakefile
@@ -1,3 +1,23 @@
#!/usr/bin/env rake
require_relative 'config/setup_load_paths'
+
require 'qless/tasks'
+namespace :qless do
+ task :set_redis_url do
+ if File.exist?('./config/redis_connection_url.txt')
+ ENV['REDIS_URL'] = File.read('./config/redis_connection_url.txt')
+ end
+ end
+
+ task :setup => :set_redis_url do
+ ENV['VVERBOSE'] = '1'
+ ENV['QUEUE'] = 'plines'
+ ENV['INTERVAL'] = '1.0'
+ end
+
+ desc "Start the Qless Web UI"
+ task :server => :set_redis_url do
+ sh "rackup config/config.ru"
+ end
+end
+
View
4 config/config.ru
@@ -0,0 +1,4 @@
+require File.expand_path('../setup_load_paths', __FILE__)
+require 'qless/server'
+
+run Qless::Server.new
View
1  config/redis_connection_url.txt.example
@@ -0,0 +1 @@
+redis://localhost:6378/8
Please sign in to comment.
Something went wrong with that request. Please try again.