Skip to content

Commit

Permalink
βœ” Stats Recon ~ πŸ˜‰
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed May 24, 2023
1 parent 218552e commit 6beec37
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/fansubid/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<noscript>πŸŽ‰ Harap Menyalakan JavaScript Untuk Dapat Mengakses Website Ini ✨</noscript>
</div>
<app-root></app-root>
<script src="runtime.75350074d108a79c.js" type="module"></script><script src="polyfills.325a71d3e423341a.js" type="module"></script><script src="scripts.03e7a8120a25f41a.js" defer></script><script src="main.f1892528d1bb539a.js" type="module"></script>
<script src="runtime.75350074d108a79c.js" type="module"></script><script src="polyfills.325a71d3e423341a.js" type="module"></script><script src="scripts.03e7a8120a25f41a.js" defer></script><script src="main.1068fde1bef97403.js" type="module"></script>


</body></html>
1 change: 1 addition & 0 deletions dist/fansubid/browser/main.1068fde1bef97403.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/fansubid/browser/main.f1892528d1bb539a.js

This file was deleted.

8 changes: 4 additions & 4 deletions dist/fansubid/browser/ngsw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1684764183649,
"timestamp": 1684933327458,
"index": "/index.html",
"assetGroups": [
{
Expand Down Expand Up @@ -41,7 +41,7 @@
"/common.1ac374edf29bcb18.js",
"/favicon.ico",
"/index.html",
"/main.f1892528d1bb539a.js",
"/main.1068fde1bef97403.js",
"/manifest.webmanifest",
"/polyfills.325a71d3e423341a.js",
"/runtime.75350074d108a79c.js",
Expand Down Expand Up @@ -114,8 +114,8 @@
"/960.cf76071ca1fb40b4.js": "7b413c0e87b4c1be4b7d993ac0e7404202d47786",
"/common.1ac374edf29bcb18.js": "1972ca7d76be821efc66593d17996f04787660d2",
"/favicon.ico": "071facb8fab2e4b3493dcfbb0b02d7bd21bca97e",
"/index.html": "75cb9e6e37f9c3e3b1c22780b51163c5fcfd22d5",
"/main.f1892528d1bb539a.js": "09b3378ba12f21bd8288c51de060e365bc7c39c3",
"/index.html": "edaec450645d0e74f378e701c70becbcc84bb22c",
"/main.1068fde1bef97403.js": "636c9c4ca4e336f48007794cc7d29f2376b9815e",
"/manifest.webmanifest": "eafb5426cdc9fd714787e5453af315b9972875a3",
"/polyfills.325a71d3e423341a.js": "18f8a8b77e7d11be1385d438c6d218cc68c0edb3",
"/runtime.75350074d108a79c.js": "06c30aa9fcd1e43743d55aa6c13cf5fd8382692b",
Expand Down
2 changes: 1 addition & 1 deletion dist/fansubid/server/main.js

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion src/api/services/idcloudhost.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import { WebSocket } from 'ws';

import { Injectable } from '@nestjs/common';
import { SchedulerRegistry } from '@nestjs/schedule';

import { CONSTANTS } from '../../constants';

import { environment } from '../../environments/api/environment';

Expand Down Expand Up @@ -32,6 +35,7 @@ export class IdCloudHostService {
ws: WebSocket;

constructor(
private sr: SchedulerRegistry,
private gs: GlobalService,
private cfg: ConfigService
) {
Expand All @@ -44,11 +48,18 @@ export class IdCloudHostService {

onError(err): void {
this.gs.log('[ID_CLOUD_HOST_SERVICE-ON_ERROR] β›ˆ', err, 'error');
this.ws.close();
}

onClose(code, data): void {
const reason = data.toString();
const reason = data.toString();
this.gs.log('[ID_CLOUD_HOST_SERVICE-ON_CLOSE] β›ˆ', { code, reason });
this.sr.addTimeout(
CONSTANTS.timeoutReconnectSocketKey,
setTimeout(() => {
this.connect();
}, CONSTANTS.timeoutReconnectSocketTime)
);
}

onMessage(data, isBinary): void {
Expand Down
2 changes: 2 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export const CONSTANTS = {
timeoutCancelRegisterTime: 5 * 60 * 1000, // 5 Minutes
timeoutDeleteTempAttachmentKey: 'TIMEOUT_DELETE_TEMP_ATTACHMENT',
timeoutDeleteTempAttachmentTime: 3 * 60 * 1000, // 3 Minutes
timeoutReconnectSocketKey: 'TIMEOUT_RECONNECT_SOCKET',
timeoutReconnectSocketTime: 5 * 1000, // 5 Seconds
timeJwtEncryption: 3 * 60, // 3 Minutes
timeLoginRememberMe: 7 * 24 * 60 * 60, // 7 Days
timeResetAccount: 5 * 60, // 5 Minutes
Expand Down

0 comments on commit 6beec37

Please sign in to comment.