Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio committed Sep 18, 2016
1 parent ef41dd9 commit 6e99544
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ app.use(function(req, res, next) {

// * Cache
var memcachedClient = new Memcached(process.env['MEMCACHED_HOST']);
memcachedClient.del('production', function (err) { console.error(err); });
memcachedClient.del('production', function (err) { if (err) console.error(err); });

// * Database
var mongoCollection;
Expand Down
4 changes: 1 addition & 3 deletions api/static/app/countrytable.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ CountryTable.prototype.data = function(arg) {
gCo2eqPerkWh: co2eqCalculator.footprintOf(d, that._data.countryCode),
gCo2eqPerH: co2eqCalculator.footprintOf(d, that._data.countryCode) * 1000.0 * arg.production[d]
};
}).filter(function (d) {
return d.mode != 'unknown' || d.production !== undefined;
});

// update scales
Expand Down Expand Up @@ -281,7 +279,7 @@ CountryTable.prototype.data = function(arg) {
.transition()
.attr('x', that.LABEL_MAX_WIDTH + (that._displayByEmissions ? that.co2Scale(0) : that.powerScale(0)))
.style('display', function (d) {
return d.production === undefined ? 'block' : 'none';
return d.mode != 'unknown' && d.production === undefined ? 'block' : 'none';
});

// Construct exchanges
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ services:
environment: [ENV=development, 'MONGO_URL=mongodb://mongo:27017/electricity']
volumes:
- './api/data:/home/data'
- './feeder/feeder.py:/home/feeder.py'
- './feeder/parsers:/home/parsers'
memcached:
image: memcached
mongo:
Expand Down
2 changes: 1 addition & 1 deletion feeder/parsers/DE.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def fetch_DE():
return data

if __name__ == '__main__':
fetch_DE()
print fetch_DE()

0 comments on commit 6e99544

Please sign in to comment.