mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
refactor: remove dead code (#3337)
This commit is contained in:
1 parent
a19002652b
commit
93d1f8af46
1527 files changed
+21170
-73846
No files matched your search
@@ -43,7 +43,7 @@ interface ConsumerState {
|
||||
|
||||
let running: ConsumerState | null = null;
|
||||
|
||||
export function decodeActionEnvelope(data: Uint8Array | string): ActionEnvelope | null {
|
||||
function decodeActionEnvelope(data: Uint8Array | string): ActionEnvelope | null {
|
||||
try {
|
||||
const value = JSON.parse(typeof data === 'string' ? data : new TextDecoder().decode(data)) as unknown;
|
||||
if (
|
||||
|
||||
@@ -14,7 +14,7 @@ import {listReportProfileSnapshotAssets} from '@fluxer/schema/src/domains/report
|
||||
import type {WorkerTaskHandler} from '@pkgs/worker/src/contracts/WorkerTask';
|
||||
import {ms} from 'itty-time';
|
||||
|
||||
export const REPORT_RETENTION_DAYS = 365;
|
||||
const REPORT_RETENTION_DAYS = 365;
|
||||
const REPORT_RETENTION_MS = REPORT_RETENTION_DAYS * ms('1 day');
|
||||
const DEFAULT_SCAN_PAGE_SIZE = 500;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ interface PendingAttachmentDownload {
|
||||
filename: string;
|
||||
}
|
||||
|
||||
export interface GuildHarvestAttachment {
|
||||
interface GuildHarvestAttachment {
|
||||
id: AttachmentID;
|
||||
filename: string;
|
||||
size: bigint;
|
||||
@@ -65,7 +65,7 @@ export interface GuildHarvestAttachment {
|
||||
height: number | null;
|
||||
}
|
||||
|
||||
export function buildGuildHarvestAttachment(
|
||||
function buildGuildHarvestAttachment(
|
||||
channelId: ChannelID,
|
||||
attachment: GuildHarvestAttachment,
|
||||
includeAttachments: boolean,
|
||||
|
||||
@@ -84,7 +84,7 @@ describe('per-message worker jobs', () => {
|
||||
|
||||
it('enqueues extractEmbeds without a ledger row', async () => {
|
||||
const workerService = new RecordingWorkerService();
|
||||
const embedService = new EmbedService(null as never, null as never, null as never, workerService);
|
||||
const embedService = new EmbedService(null as never, null as never, workerService);
|
||||
await embedService.enqueueUrlEmbedExtraction(createChannelID(3n), createMessageID(2n), null, 'block');
|
||||
expect(workerService.jobs).toHaveLength(1);
|
||||
expect(workerService.jobs[0]!.taskType).toBe('extractEmbeds');
|
||||
@@ -109,7 +109,7 @@ describe('per-message worker jobs', () => {
|
||||
});
|
||||
|
||||
it('drops embed extraction instead of failing the send when the jobs stream is full', async () => {
|
||||
const embedService = new EmbedService(null as never, null as never, null as never, new OverflowingWorkerService());
|
||||
const embedService = new EmbedService(null as never, null as never, new OverflowingWorkerService());
|
||||
await expect(
|
||||
embedService.enqueueUrlEmbedExtraction(createChannelID(3n), createMessageID(2n), null, 'block'),
|
||||
).resolves.toBeUndefined();
|
||||
|
||||
Reference in new issue
Block a user