Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"updateParentDepsIfNeeded is not defined" still throwing on 1.51.1 #848

Closed
prescience-data opened this issue Oct 29, 2021 · 1 comment
Closed

Comments

@prescience-data
Copy link

prescience-data commented Oct 29, 2021

Recurrence

#837 is closed after Hotfix MR, so registering new issue.

Issue

I am on 1.51.1 (post the Hotfix) and still receiving this error.

 2021-10-29 04:53:18.069  ERROR
 [
   'Error acquiring job for worker "fc97cf34-8e61-49f9-9e40-6cb7330c92df":',
   ReferenceError: updateParentDepsIfNeeded is not defined
       at eval (lodash.templateSources[1]:9:11)
       at loadScripts (/home/node_modules/bullmq/dist/commands/index.js:64:47)
       at async Object.exports.load (/home/node_modules/bullmq/dist/commands/index.js:24:21)
       at async RedisConnection.init (/home/node_modules/bullmq/dist/classes/redis-connection.js:98:9),
   0,
   0
 ]

Code

export const acquireJob = async <Request , Response>(
  bullWorker: BullWorker<Request, Response>,
  uuid: string
): Promise<BullJob<Request, Response>> => {
  let attempts: number = 0
  let duration: number = 0
  const timeout: number = env.JOB_ACQUISITION_TIMEOUT
  const startedAt: number = Date.now()
  // Loop until a job lock is acquired.
  while (duration < timeout) {
    try {
      const job: BullJob<Request, Response> | undefined =
        (await bullWorker.getNextJob(uuid)) ?? undefined
      if (job) {
        logger.info(`Acquired job!`, { id: job.id })
        return job
      }
      attempts++
      duration += Date.now() - startedAt
    } catch (error) {
      logger.error(
        `Error acquiring job for worker "${uuid}":`,
        error,
        attempts,
        duration
      )
    }
  }
  throw new JobAcquisitionTimeoutError(uuid, attempts, duration)
}

Context

  • Docker, Ubuntu 20.04
  • Node 16
  • BullMQ 1.51.1
@prescience-data
Copy link
Author

Sorry, finally worked out it was a cached layer in the Dockerfile that hadn't been rebuilt since the hotfix released. 🤦🏻‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant