Permalink
Browse files

remove testing code

  • Loading branch information...
1 parent 37de49f commit 8e510411f2171d14ca360a61eebbef743b2c0143 @rafaelss committed Jan 28, 2012
Showing with 9 additions and 6 deletions.
  1. +0 −6 bin/queue_worker
  2. +9 −0 lib/pg_queue/tasks.rb
View
@@ -1,12 +1,6 @@
#!/usr/bin/env ruby
require "pg_queue"
-class MailQueue
- def self.perform(email)
- puts email
- end
-end
-
worker = PgQueue::Worker.new
["INT", "TERM"].each do |signal|
View
@@ -0,0 +1,9 @@
+namespace :pg_queue do
+ task :drop_table do
+ PgQueue.connection.exec("DROP TABLE IF EXISTS pg_queue_jobs")
+ end
+
+ task :create_table => :drop_table do
+ PgQueue.connection.exec("CREATE TABLE pg_queue_jobs (id SERIAL, class_name VARCHAR, args TEXT)")
+ end
+end

0 comments on commit 8e51041

Please sign in to comment.