This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sidekiq::BatchSet.new.each { |batch| Sidekiq::Batch::Status.new(batch.bid).delete } | |
Sidekiq::Queue.all.each(&:clear) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS drop_index_if_exists $$ | |
CREATE PROCEDURE drop_index_if_exists(in theTable varchar(128), in theIndexName varchar(128) ) | |
BEGIN | |
IF((SELECT COUNT(*) AS index_exists FROM information_schema.statistics WHERE TABLE_SCHEMA = DATABASE() and table_name = | |
theTable AND index_name = theIndexName) > 0) THEN | |
SET @s = CONCAT('DROP INDEX `' , theIndexName , '` ON `' , theTable, '`'); | |
PREPARE stmt FROM @s; | |
EXECUTE stmt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.extend({ | |
postJSON: function(url, data, callback) { | |
return jQuery.ajax({ | |
type: "POST", | |
url: url, | |
data: JSON.stringify(data), | |
success: callback, | |
dataType: "json", | |
contentType: "application/json", | |
processData: false |