Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/util/db-schema/project-info.ts
Views: 687
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45/*6This table contains real-time information about a running project. In particular, this includes the running processes, CGroup status, etc. It is updated frequently, hence use it wisely...7*/89import { Table } from "./types";1011Table({12name: "project_info",13fields: {14project_id: {15type: "uuid",16desc: "The project id.",17},18info: {19// change this according to all the usual schema rules20type: "map",21pg_type: "JSONB[]",22desc: "Info about the project",23},24},25rules: {26durability: "ephemeral", // won't be stored in the database at all ever.27desc:28"Information about running processes, cgroups, disk space, etc. of projects",29primary_key: ["project_id"], // can list multiple another field if you want to have multiple records for a project.30user_query: {31get: {32pg_where: ["projects"],33fields: {34project_id: null,35info: null,36},37},38set: {39// users can set that they are interested in this40fields: {41project_id: "project_id",42info: true,43},44},45},4647project_query: {48get: {49pg_where: [{ "project_id = $::UUID": "project_id" }],50fields: {51project_id: null,52info: null,53},54},55set: {56// delete=true, since project *IS* allowed to delete entries57delete: true,58fields: {59project_id: "project_id",60info: true,61},62},63},64},65});666768