Skip to content

Commit

Permalink
Merge PR #426 - fix node 14+ errors
Browse files Browse the repository at this point in the history
Fix node 14+ error ERR_INVALID_ARG_TYPE
  • Loading branch information
TheHolyRoger authored Jan 17, 2021
2 parents f4164ad + ee2a273 commit eb33a94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/cluster
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var cluster = require('cluster');
var fs = require('fs');

if (cluster.isMaster) {
fs.writeFile('./tmp/cluster.pid', process.pid, function (err) {
fs.writeFile('./tmp/cluster.pid', process.pid.toString(), function (err) {
if (err) {
console.log('Error: unable to create cluster.pid');
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function get_market_data(market, cb) {
function create_lock(lockfile, cb) {
if (settings.lock_during_index == true) {
var fname = './tmp/' + lockfile + '.pid';
fs.appendFile(fname, process.pid, function (err) {
fs.appendFile(fname, process.pid.toString(), function (err) {
if (err) {
console.log("Error: unable to create %s", fname);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (process.argv[2] == 'index') {
function create_lock(cb) {
if ( database == 'index' ) {
var fname = './tmp/' + database + '.pid';
fs.appendFile(fname, process.pid, function (err) {
fs.appendFile(fname, process.pid.toString(), function (err) {
if (err) {
console.log("Error: unable to create %s", fname);
process.exit(1);
Expand Down

0 comments on commit eb33a94

Please sign in to comment.