removed more stuff

This commit is contained in:
Boki 2025-06-23 22:51:55 -04:00
parent 2d14bb87f9
commit 566f5dac92
2 changed files with 29 additions and 52 deletions

View file

@ -1,10 +1,16 @@
import { getRandomUserAgent } from '@stock-bot/utils';
import type { CeoHandler } from '../ceo.handler';
interface ProcessIndividualSymbolPayload {
ceoId: string;
symbol: string;
timestamp?: string;
}
export async function processIndividualSymbol(
this: CeoHandler,
payload: any,
_context: any
payload: ProcessIndividualSymbolPayload,
_context: unknown
): Promise<unknown> {
const { ceoId, symbol, timestamp } = payload;
const proxy = this.proxy?.getProxy();
@ -42,7 +48,27 @@ export async function processIndividualSymbol(
return null; // No data to process
}
const latestSpielTime = data.spiels[0]?.timestamp;
const posts = data.spiels.map((spiel: any) => ({
interface Spiel {
spiel: string;
spiel_reply_to_id: string;
spiel_reply_to: string;
spiel_reply_to_name: string;
spiel_reply_to_edited: boolean;
user_id: string;
name: string;
timestamp: string;
spiel_id: string;
color: string;
parent_id: string;
public_id: string;
parent_channel: string;
parent_timestamp: string;
votes: number;
editable: boolean;
edited: boolean;
}
const posts = data.spiels.map((spiel: Spiel) => ({
ceoId,
spiel: spiel.spiel,
spielReplyToId: spiel.spiel_reply_to_id,

View file

@ -146,34 +146,6 @@ export interface InsertResult {
errors?: string[];
}
/**
* Schema Definition Types
*/
interface ColumnDefinition {
name: string;
type:
| 'SYMBOL'
| 'STRING'
| 'DOUBLE'
| 'FLOAT'
| 'LONG'
| 'INT'
| 'BOOLEAN'
| 'TIMESTAMP'
| 'DATE'
| 'BINARY';
indexed?: boolean;
capacity?: number; // For SYMBOL type
}
interface TableDefinition {
name: string;
columns: ColumnDefinition[];
partitionBy?: 'NONE' | 'DAY' | 'MONTH' | 'YEAR';
timestamp?: string; // Column name to use as designated timestamp
dedup?: boolean;
}
/**
* Connection Pool Types
*/
@ -210,27 +182,6 @@ export interface PerformanceMetrics {
memoryUsage: number;
}
/**
* Query Builder Types
*/
interface TimeSeriesQuery {
table: TableNames | string;
columns?: string[];
timeRange?: TimeRange;
groupBy?: string[];
aggregations?: Record<string, string>;
sampleBy?: string;
latestBy?: string[];
orderBy?: Array<{ column: string; direction: 'ASC' | 'DESC' }>;
limit?: number;
}
interface AggregationQuery {
aggregations: Record<string, string>;
groupBy?: string[];
having?: string[];
}
export interface TimeRange {
startTime: Date;
endTime: Date;