mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
⭐ feat(maitred): Update maitred - hookup to the API (#198)
## Description We are attempting to hookup maitred to the API Maitred duties will be: - [ ] Hookup to the API - [ ] Wait for signal (from the API) to start Steam - [ ] Stop signal to stop the gaming session, clean up Steam... and maybe do the backup ## Summary by CodeRabbit - **New Features** - Introduced Docker-based deployment configurations for both the main and relay applications. - Added new API endpoints enabling real-time machine messaging and enhanced IoT operations. - Expanded database schema and actor types to support improved machine tracking. - **Improvements** - Enhanced real-time communication and relay management with streamlined room handling. - Upgraded dependencies, logging, and error handling for greater stability and performance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com> Co-authored-by: Kristian Ollikainen <14197772+DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
37
packages/core/src/machine/machine.sql.ts
Normal file
37
packages/core/src/machine/machine.sql.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { } from "drizzle-orm/postgres-js";
|
||||
import { timestamps, id } from "../drizzle/types";
|
||||
import {
|
||||
text,
|
||||
varchar,
|
||||
pgTable,
|
||||
uniqueIndex,
|
||||
point,
|
||||
} from "drizzle-orm/pg-core";
|
||||
|
||||
export const machineTable = pgTable(
|
||||
"machine",
|
||||
{
|
||||
...id,
|
||||
...timestamps,
|
||||
country: text('country').notNull(),
|
||||
timezone: text('timezone').notNull(),
|
||||
location: point('location', { mode: 'xy' }).notNull(),
|
||||
fingerprint: varchar('fingerprint', { length: 32 }).notNull(),
|
||||
countryCode: varchar('country_code', { length: 2 }).notNull(),
|
||||
// provider: text("provider").notNull(),
|
||||
// gpuType: text("gpu_type").notNull(),
|
||||
// storage: numeric("storage").notNull(),
|
||||
// ipaddress: text("ipaddress").notNull(),
|
||||
// gpuNumber: integer("gpu_number").notNull(),
|
||||
// computePrice: numeric("compute_price").notNull(),
|
||||
// driverVersion: integer("driver_version").notNull(),
|
||||
// operatingSystem: text("operating_system").notNull(),
|
||||
// fingerprint: varchar("fingerprint", { length: 32 }).notNull(),
|
||||
// externalID: varchar("external_id", { length: 255 }).notNull(),
|
||||
// cudaVersion: numeric("cuda_version", { precision: 4, scale: 2 }).notNull(),
|
||||
},
|
||||
(table) => [
|
||||
// uniqueIndex("external_id").on(table.externalID),
|
||||
uniqueIndex("machine_fingerprint").on(table.fingerprint)
|
||||
],
|
||||
);
|
||||
Reference in New Issue
Block a user