feedhenry/fh-sync

Standardise environment variable names

evanshortiss opened this issue · 0 comments

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.