Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove testing code

  • Loading branch information...
commit 8e510411f2171d14ca360a61eebbef743b2c0143 1 parent 37de49f
@rafaelss authored
Showing with 9 additions and 6 deletions.
  1. +0 −6 bin/queue_worker
  2. +9 −0 lib/pg_queue/tasks.rb
View
6 bin/queue_worker
@@ -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
9 lib/pg_queue/tasks.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.