feedhenry / fh-sync

Node.js implementation of the FeedHenry Data Synchronisation Server. To be used in conjunction with the FeedHenry Data Synchronisation Client.
http://feedhenry.org
Apache License 2.0
5 stars 17 forks source link

Standardise environment variable names #32

Closed evanshortiss closed 5 years ago

evanshortiss commented 7 years ago

I found this code snippet today:

  var pendingWorkerInterval = process.env.PENDING_WORKER_INTERVAL || 500;
  var syncWorkerInterval = process.env.SYNC_WORKER_INTERVAL || 500;
  var ackWorkerInterval = process.env.ACK_WORKER_INTERVAL || 500;

Should these not be namespaced? For example:

  var pendingWorkerInterval = process.env.SYNC_PENDING_WORKER_INTERVAL || 500;
  var syncWorkerInterval = process.env.SYNC_WORKER_INTERVAL || 500;
  var ackWorkerInterval = process.env.SYNC_ACK_WORKER_INTERVAL || 500;

This is a little more logical since all vars start with SYNC_ and can easily be found using grep or similar tools.