Skip to content

Commit 39e135e

Browse files
rectified naming of deferuploads
1 parent c8d2b2d commit 39e135e

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/lib/ctx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default (options: Record<string, string>): Context => {
7676
allowedHostnames: config.allowedHostnames || [],
7777
basicAuthorization: basicAuthObj,
7878
smartIgnore: config.smartIgnore ?? false,
79-
delayedUploads: config.delayedUploads ?? false
79+
delayedUpload: config.delayedUpload ?? false
8080
},
8181
uploadFilePath: '',
8282
webStaticConfig: [],

src/lib/schemaValidation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ const ConfigSchema = {
151151
},
152152
}
153153
},
154-
delayedUploads: {
154+
delayedUpload: {
155155
type: "boolean",
156-
errorMessage: "Invalid config; delayedUploads must be true/false"
156+
errorMessage: "Invalid config; delayedUpload must be true/false"
157157
},
158158
},
159159
anyOf: [

src/lib/snapshotQueue.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default class Queue {
1717

1818
enqueue(item: Snapshot): void {
1919
this.snapshots.push(item);
20-
if(!this.ctx.config.delayedUploads){
20+
if(!this.ctx.config.delayedUpload){
2121
if (!this.processing) {
2222
this.processing = true;
2323
this.processNext();
@@ -260,7 +260,7 @@ export default class Queue {
260260
private async processNext(): Promise<void> {
261261
if (!this.isEmpty()) {
262262
let snapshot;
263-
if (this.ctx.config.delayedUploads){
263+
if (this.ctx.config.delayedUpload){
264264
snapshot = this.snapshots.pop();
265265
} else {
266266
snapshot = this.snapshots.shift();
@@ -270,7 +270,7 @@ export default class Queue {
270270
let drop = false;
271271

272272
if (snapshot && snapshot.name && this.snapshotNames.includes(snapshot.name)) {
273-
if (!this.ctx.config.delayedUploads){
273+
if (!this.ctx.config.delayedUpload){
274274
drop = true;
275275
this.ctx.log.debug(`snapshot failed; Same snapshot has been encountered with defer Uploads being false`);
276276
} else {

src/tasks/processSnapshot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export default (ctx: Context): ListrTask<Context, ListrRendererFactory, ListrRen
1010

1111
try {
1212
// wait for snapshot queue to be empty
13-
if(ctx.config.delayedUploads){
14-
ctx.log.debug("started after processing because of delayedUploads")
13+
if(ctx.config.delayedUpload){
14+
ctx.log.debug("started after processing because of delayedUpload")
1515
ctx.snapshotQueue?.startProcessingfunc()
1616
}
1717
await new Promise((resolve) => {

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface Context {
2525
allowedHostnames: Array<string>;
2626
basicAuthorization: basicAuth | undefined;
2727
smartIgnore: boolean;
28-
delayedUploads: boolean;
28+
delayedUpload: boolean;
2929
};
3030
uploadFilePath: string;
3131
webStaticConfig: WebStaticConfig;

0 commit comments

Comments
 (0)