simpleci-worker 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/worker/queue.rb +1 -2
- data/lib/worker/version.rb +1 -1
- data/lib/worker.rb +1 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e66d46f2770aa096322e29b5ab18aa46f80e1ce3
|
4
|
+
data.tar.gz: 7a6f5cea30ab41f766680439fe16d44a46495dd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60d297e2af10083aa26dd470997dbc09875083176fdf870c09de780bb42526f1bd26b810602b637e519c855fd965cdee62ef119ea1b617f693d7cc57c00dafea
|
7
|
+
data.tar.gz: cbc25d9178cde3e2db11e9f972b132ea24e2bb1afcbdad64caabd58e5adf15b33cd5abc4c9ea3167a1c90e18c758e1ed72f5bde6d8c8876b82f99269c2ff4524
|
data/lib/worker/queue.rb
CHANGED
@@ -10,8 +10,7 @@ module Worker
|
|
10
10
|
def initialize(opts={})
|
11
11
|
@logger = Logger.new(STDOUT)
|
12
12
|
|
13
|
-
db_config = opts[:db_config] || Worker.
|
14
|
-
|
13
|
+
db_config = opts[:db_config] || Worker.db
|
15
14
|
db_config.merge(logger: logger) if opts[:log_queries]
|
16
15
|
|
17
16
|
@db = Sequel.connect(db_config)
|
data/lib/worker/version.rb
CHANGED
data/lib/worker.rb
CHANGED
@@ -5,21 +5,6 @@ require "logger"
|
|
5
5
|
|
6
6
|
module Worker
|
7
7
|
class << self
|
8
|
-
attr_accessor :queue, :logger, :db
|
9
|
-
|
10
|
-
def db_config
|
11
|
-
db[env]
|
12
|
-
end
|
13
|
-
|
8
|
+
attr_accessor :queue, :logger, :db
|
14
9
|
end
|
15
10
|
end
|
16
|
-
|
17
|
-
Worker.env = :test
|
18
|
-
Worker.db = {
|
19
|
-
test: {
|
20
|
-
adapter: 'sqlite',
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
Worker.queue = Worker::Queue.new
|
25
|
-
Worker.logger = Logger.new(STDOUT)
|