Skip to content

Commit

Permalink
support for koop-pgcache in the export workers
Browse files Browse the repository at this point in the history
  • Loading branch information
chelm committed Mar 2, 2015
1 parent 0fff846 commit 63a4103
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

## [1.0.18](https://github.com/Esri/koop/releases/tag/v1.0.18) - 2015-03-02
###Added
- support for koop-pgcache to export workers

## [1.0.17](https://github.com/Esri/koop/releases/tag/v1.0.17) - 2015-03-02
###Changed
- Koop longer ships with default support for PostGIS or Spatiallite. These have become optional plugins
Expand Down
14 changes: 3 additions & 11 deletions lib/ExportWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var kue = require('kue'),
mv = require('mv'),
async = require('async'),
koop = require('./'),
pgcache = require('koop-pgcache'),
cluster = require('cluster'),
path = require('path'),
rimraf = require('rimraf'),
Expand All @@ -28,17 +29,8 @@ koop.log = new koop.Logger( config );
koop.Cache = new koop.DataCache( koop );
koop.files = new koop.Files( koop );

// Start the Cache DB with the conn string from config
if ( config && config.db ) {
if ( config.db.postgis ) {
koop.Cache.db = koop.PostGIS.connect( config.db.postgis.conn );
} else if ( config && config.db.sqlite ) {
koop.Cache.db = koop.SQLite.connect( config.db.sqlite );
}
koop.Cache.db.log = koop.log;
} else if (config && !config.db){
process.exit();
}
// registers a DB modules
koop.Cache.db = pgcache.connect( config.db.conn, koop );

// create the job queue
jobs = kue.createQueue({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "koop",
"version": "1.0.17",
"version": "1.0.18",
"description": "A node module/express middleware for converting GeoJSON to Esri Feature Services.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 63a4103

Please sign in to comment.