Skip to content

Commit

Permalink
Disable typeorm redis caching (#121)
Browse files Browse the repository at this point in the history
* refactored statistic

* refactoring + documentation

* finished refactoring on maintainers

* finished connector refactoring

* finished eslinting all remaining ts files

* documented server.ts + added markdown files

* refactored cli.ts

* fixed some typing issues

* revamped packages + redid express structure + more linting

* more type hinting + async removal on models

* linting on main src/ files

* changes to type assertions

* finished maintainers

* make types more meaningful

* finished with util rework + minor changes elsewhere

* finished linting + helper rework + better nullguarding + max line size

* fixed helper typo & slurmconnector doc

* add specialized manifest download functionality + lint action

* documentation initial commit + helper moving + abstract functions + initial lazy supervisor

* finished codebase overview doc

* finished codebase documentation doc

* added caching to folder uploaders + a bit more linting

* disable cached upload on data

* added cache refresing functionality

* fixed swagger error

* fixed cli

* readd typedoc

* more package updates

* added mysql

* disable uml

* move all documentation out of build

* fixed generate swagger bug

* reenable documentation

* fixed gitutil bug + updated packages

* recursive mkdirs

* more gitutil bugfixes

* silenced console.logs

* reenabled urlencoded

* fixed folder uploader bug

* more bugfixing + removing console logs

* fixed remotefsexists bug

* job upload now works

* update build script to copy example jsons

* fixed github actions

* added ruff for the python files for now

* added typing to cachedupload

* switched to git sdk

* switch to fs promises

* automated branch resolution + out of date checking

* moved configs to example

* undo config.json move

* fixed action typo

* removed all refreshing code + added automatic logic to decide when to re-upload git repo

* added yaml parser

* rework folder typing to be more enumy

* leftover changes from folder rework

* added cache model

* force synchronize

* synchronize in the json

* actually force reinitialize

* turned strict on + updated packages + migrated to typeorm 0.3 + migrated to redis 5 + cleaned up redis classes

* reworked tsconfig

* remove typeorm-uml

* actually disable uml + add cache to entities

* actually disable uml instead of tsdoc

* fixed redis

* connect to redis client

* reworked cache + deprecated specialized manifest + added more git caching

* reworked refreshing in getexecutablemanifest

* reworked db to not be a class per typeorm guidelines

* leftover db port changes

* remove ormconfig

* initialize database in server.ts

* fixed some minor errors

* initialize datasource in init hello world

* reenable register

* move this.register

* fix db registering

* fix db registering

* add print statements

* debugging job2object

* updated dockerfile + removed print statements

* fixed typing on nullable model columns

* better undefined/null handling + typeorm function fixes

* added more is_testing clauses to console logs

* fixed registercache

* more fixes to hpcpath -> cachepath

* disable removing comments

* styling change + git manifest cache + new git routes

* rework server structure

* initialize cache

* change rimraf

* changed promises to awaits

* change unix time scaling

* fix linting in cli

* undo examples folder

* rename a file

* fixed merge bugs

* fixed linting

* change the eslint config

* revert back to commonjs

* change global variables

* disable typeorm redis caching
  • Loading branch information
yianzhang14 authored Jun 11, 2024
1 parent 9843a3e commit 45c3f8d
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions src/DB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ import {
DataSource,
} from "typeorm";
import { config } from "../configs/config";
import { Event } from "../src/models/Event";
import { Job } from "../src/models/Job";
import { Log } from "../src/models/Log";
import * as Helper from "./lib/Helper";
import { Cache } from "./models/Cache";
import { Folder } from "./models/Folder";
import { Git } from "./models/Git";
import { GlobusTransferRefreshToken } from "./models/GlobusTransferRefreshToken";

const entities = [Event, Log, Job, Git, GlobusTransferRefreshToken, Folder, Cache, "production/src/models/**/*.js"];
const entities = [__dirname + "/models/**/*.js"];

let dbConfig: DataSourceOptions = {
name: "default",
Expand All @@ -26,15 +19,15 @@ let dbConfig: DataSourceOptions = {
logging: false,
migrationsRun: true,
entities: entities,
cache: {
type: "redis",
options: {
host: config.redis.host,
port: config.redis.port,
// TODO: add password support
},
ignoreErrors: true,
},
// cache: {
// type: "redis",
// options: {
// host: config.redis.host,
// port: config.redis.port,
// // TODO: add password support
// },
// ignoreErrors: true,
// },
};

if (config.is_jest) {
Expand Down

0 comments on commit 45c3f8d

Please sign in to comment.