Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix config usage in worker_controller - Closes #2216 #2217

Merged
merged 2 commits into from
Jul 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions workers_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

'use strict';

var path = require('path');
var fs = require('fs');
var async = require('async');
var SCWorker = require('socketcluster/scworker');
var SlaveWAMPServer = require('wamp-socket-cluster/SlaveWAMPServer');
Expand All @@ -30,14 +28,8 @@ var PeersUpdateRules = require('./api/ws/workers/peers_update_rules');
var Rules = require('./api/ws/workers/rules');
var failureCodes = require('./api/ws/rpc/failure_codes');
var Logger = require('./logger');

var config = fs.readFileSync(
path.resolve(
process.cwd(),
`./config/${process.env.LISK_NETWORK}/config.json`
),
'utf8'
);
var AppConfig = require('./helpers/config.js');
var config = AppConfig(require('./package.json'), false);

/**
* Instantiate the SocketCluster SCWorker instance with custom logic
Expand Down