This file contains hidden or 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
(ns logerror.core | |
(:require | |
[immutant.cache :as cache] | |
[clojure.tools.logging :as log])) | |
(println @#'clojure.tools.logging/*logger-factory*) | |
(try | |
(def my-cache (cache/create "cache")) | |
(catch Exception e | |
(.printStackTrace e) |
This file contains hidden or 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
(if (resolve 'clojure.java.jdbc/transaction*) | |
(do | |
(in-ns 'clojure.java.jdbc) | |
(def ^{:dynamic true} xa-transaction* transaction*) | |
(defn transaction* [& args] (apply xa-transaction* args)) | |
(in-ns 'immutant.xa.transaction)) | |
(println "Using XA with java.jdbc 0.1.x is not supported")) | |
This file contains hidden or 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
class PostCodeGo | |
include TorqueBox::Messaging::Backgroundable | |
always_background :postcode, :priority => :normal | |
def postcode(time, origin, mode, email) | |
iso = Real::Chrone.new_or_cached(time: time, origin: origin, mode: mode.to_sym) | |
csvs = [iso.postcode_csv, iso.postcode_sector_csv, iso.postcode_district_csv] | |
CsvMailer.files(csvs, time, mode, email).deliver | |
end | |
This file contains hidden or 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
# SQLite version 3.x | |
# gem install sqlite3 | |
# | |
# Ensure the SQLite 3 gem is defined in your Gemfile | |
# gem 'sqlite3' | |
development: | |
adapter: jdbcmysql | |
xa: false | |
encoding: utf8 |
This file contains hidden or 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
# in the test: | |
queue = TorqueBox::Messaging::Queue.new( '/queue/response' ) | |
queue.receive( :timeout => 120_000 ).should == 'started' | |
queue.receive( :timeout => 5_000 ).should be_nil |
This file contains hidden or 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
service AService { | |
name = 'x' | |
singleton = true | |
config :foo => :bar | |
} |
This file contains hidden or 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
service 'x' { | |
class AService | |
singleton true | |
config :foo => :bar | |
} |
This file contains hidden or 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
[ | |
[true, 'prop = true'], | |
[true, 'prop <> false'], | |
[5, 'prop = 5'], | |
[5, 'prop > 4'], | |
[5.5, 'prop = 5.5'], | |
[5.5, 'prop < 6'], | |
['string', "prop = 'string'"] | |
].each do |value, selector| | |
it "should be able to select with property set to #{value} using selector '#{selector}'" do |
This file contains hidden or 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
def initialize(destination, connection_factory = inject( 'connection-factory' ) ) | |
@name = destination | |
@connection_factory = ConnectionFactory.new( connection_factory ) | |
end |
NewerOlder