add view result to environment variable
This commit is contained in:
parent
0aa2edc09d
commit
30327df425
|
@ -9,5 +9,6 @@ ENV['NTNU_DB_HOST'] = 'database host'
|
|||
ENV['NTNU_DB_PORT'] = 'database port'
|
||||
ENV['TDS_VERSION'] = '5.0'
|
||||
ENV['DB_NAME'] = 'database name'
|
||||
ENV['VIEW_RESULT'] = 'database view result'
|
||||
```
|
||||
* set cron job to run `bundle exec rake sync_personal_plugins:sync` everyday
|
||||
|
|
|
@ -15,7 +15,8 @@ namespace :sync_personal_plugins do
|
|||
end
|
||||
|
||||
# Query data and store them to local memory
|
||||
tds_result = sybase_client.execute 'SELECT * FROM VIEW_RESULTS_0001'
|
||||
view = ENV['VIEW_RESULT']
|
||||
tds_result = sybase_client.execute "SELECT * FROM #{view}"
|
||||
query_result = tds_result.entries
|
||||
|
||||
# Close the NTNU SyBase connection
|
||||
|
|
Loading…
Reference in New Issue