Skip to content

Commit

Permalink
fix(scripts): set package version by default for extension (#2887)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Nov 8, 2024
1 parent f123e1e commit b955340
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/classes/redis-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class RedisConnection extends EventEmitter {
private readonly initializing: Promise<RedisClient>;

private version: string;
protected packageVersion: string;
protected packageVersion = packageVersion;
private skipVersionCheck: boolean;
private handleClientError: (e: Error) => void;
private handleClientClose: () => void;
Expand All @@ -65,7 +65,6 @@ export class RedisConnection extends EventEmitter {
skipVersionCheck = false,
) {
super();
this.packageVersion = packageVersion;
if (!isRedisInstance(opts)) {
this.checkBlockingOptions(overrideMessage, opts);

Expand Down
6 changes: 2 additions & 4 deletions src/classes/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,17 @@ import {
import { ErrorCode } from '../enums';
import { array2obj, getParentKey, isRedisVersionLowerThan } from '../utils';
import { ChainableCommander } from 'ioredis';
import { version } from '../version';
import { version as packageVersion } from '../version';
export type JobData = [JobJsonRaw | number, string?];

export class Scripts {
protected version;
protected version = packageVersion;

moveToFinishedKeys: (string | undefined)[];

constructor(protected queue: MinimalQueue) {
const queueKeys = this.queue.keys;

this.version = version;

this.moveToFinishedKeys = [
queueKeys.wait,
queueKeys.active,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
import { SpanKind, TelemetryAttributes } from '../enums';
import { JobScheduler } from './job-scheduler';

// 10 seconds is the maximum time a BRPOPLPUSH can block.
// 10 seconds is the maximum time a BZPOPMIN can block.
const maximumBlockTimeout = 10;

// 30 seconds is the maximum limit until.
Expand Down

0 comments on commit b955340

Please sign in to comment.