Skip to content

Commit

Permalink
✔ TODO :: DDL ~
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed Jan 6, 2024
1 parent 7e68e2d commit 38fc3a6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/api/scheduler/upload-task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { BerkasService } from '../repository/berkas.service';
import { UserPremiumService } from '../repository/user-premium.service';

import { GlobalService } from '../services/global.service';
import { ConfigService } from '../services/config.service';
import { DiscordService } from '../services/discord.service';
import { GoogleCloudService } from '../services/google-cloud.service';
import { MkvExtractService } from '../services/mkv-extract.service';
Expand All @@ -27,7 +26,6 @@ export class UploadService {

constructor(
private sr: SchedulerRegistry,
private cfg: ConfigService,
private attachmentRepo: AttachmentService,
private berkasRepo: BerkasService,
private userPremiumRepo: UserPremiumService,
Expand Down Expand Up @@ -184,7 +182,7 @@ export class UploadService {
],
relations: ['user_']
});
if (this.cfg.serverGetDdlDiscord() || attachment.size > CONSTANTS.fileSizeAttachmentDdlBucketLimit || primeCount <= 0) {
if (primeCount <= 0) {
const chunkParent = await this.ds.sendAttachment(attachment);
attachment.discord = chunkParent;
attachment.pending = false;
Expand Down
7 changes: 1 addition & 6 deletions src/api/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export class ConfigService {
isMaintenance: false,
winboxOpenLink: false,
discordNotification: true,
openForRegister: true,
ddlDiscord: true
openForRegister: true
}

private room_socket: RoomModel = {};
Expand Down Expand Up @@ -95,10 +94,6 @@ export class ConfigService {
return this.serverGet().openForRegister;
}

serverGetDdlDiscord(): boolean {
return this.serverGet().ddlDiscord;
}

roomSocketGetAll(): RoomModel {
return this.room_socket;
}
Expand Down
1 change: 0 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export const CONSTANTS = {
'application/x-zip',
'application/x-zip-compressed'
],
fileSizeAttachmentDdlBucketLimit: 64 * 1000 * 1000, // < 128 MB Masuk Bucket DDL Enteng Kenceng :V
fileSizeAttachmentChunkCloudflareLimit: 32 * 1000 * 1000, // Cloudflare User Plan -- Free Is 100 MB ~ T.T
fileSizeAttachmentChunkDiscordLimit: 8 * 1000 * 1000, // Discord -- Without Nitro Is 8 MB ~ T.T
fileTypeAttachmentStreamable: [
Expand Down
1 change: 0 additions & 1 deletion src/models/socket-io.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export interface ServerInfoModel {
winboxOpenLink: boolean;
discordNotification: boolean;
openForRegister: boolean;
ddlDiscord: boolean;
}

export interface PingPongModel {
Expand Down

0 comments on commit 38fc3a6

Please sign in to comment.