prepareJob = async (funcLogger, symbol, _jobPayload) => {
  const logger = funcLogger.child({ helper: 'queue', func: 'prepareJob' });

  // Initialize queue for symbol if not yet initialized
  if (startedJobs[symbol] === undefined) {
    startedJobs[symbol] = 0;
    finishedJobs[symbol] = 0;

    logger.info({ symbol }, `Queue ${symbol} initialized`);
  }

  // Start a new job - wait if previous job is still running
  const pos = (startedJobs[symbol] += 1) - 1;

  if (pos > finishedJobs[symbol]) {
    // Wait until previous job is completed
    logger.info({ symbol }, `Queue ${symbol} job #${pos} waiting`);
    while (pos > finishedJobs[symbol]) {
      // eslint-disable-next-line no-await-in-loop, no-promise-executor-return
      await new Promise(r => setTimeout(r, 10));
    }
  }

  logger.info({ symbol }, `Queue ${symbol} job #${pos} started`);

  return false; // continue
}
Prepare the job in queue

@param {*} funcLogger
@param {*} symbol
@param {*} _jobPayload