Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit f4d4654

Browse files
authored
Merge pull request #102 from lumoslabs/schema-thread
fix issue with refresh_schema thread
2 parents f3e7fc8 + 32c54a0 commit f4d4654

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ coverage
1111
tmp
1212
log
1313
config/attribute-map.yml
14+
.idea/

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Change Log
33

44
All notable changes to this project will be documented in this file using [Semantic Versioning](http://semver.org/).
55

6+
## [0.4.8] - 2020-01-20
7+
### Fixed
8+
- [Fix issue with thread refresh_schema](https://github.com/lumoslabs/aleph/issues/103)
9+
610
## [0.4.7] - 2020-01-17
711
### Fixed
812
- Fix issue with schema cache

aleph.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |s|
22
s.name = 'aleph_analytics'
3-
s.version = '0.4.7'
4-
s.date = '2020-01-17'
3+
s.version = '0.4.8'
4+
s.date = '2020-01-20'
55
s.summary = 'Redshift/Snowflake analytics platform'
66
s.description = 'The best way to develop and share queries/investigations/results within an analytics team'
77
s.authors = ['Andrew Xue', 'Rob Froetscher', 'Joyce Lau']

lib/schemas/descriptor.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def initialize(role)
2727

2828
Rails.logger.info("Start schema refresher thread for #{@role}")
2929
@refresher_thread = Thread.new{ schema_refresher }
30+
@refresher_thread.abort_on_exception = true
3031
end
3132

3233
def schemas
@@ -61,7 +62,7 @@ def retrieve
6162
def schema_refresher
6263
loop do
6364
refresh_schema
64-
sleep(SCHEMA_REFRESH_INTERVAL)
65+
sleep(SCHEMA_REFRESH_INTERVAL.to_i)
6566
end
6667
end
6768

0 commit comments

Comments
 (0)