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

fix(scripts): set package version by default for extension #2887

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading