mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-02 17:13:33 +01:00
fix: restore Node deployment and keep Go on its branch
This commit is contained in:
1 parent
1983441c68
commit
bff2e343fd
602 files changed
+92
-1026486
No files matched your search
@@ -1,15 +0,0 @@
|
||||
const {Readable}=require('node:stream');
|
||||
const path=require('node:path');
|
||||
process.env.SESSION_SECRET='synthetic-shared-http';
|
||||
require('ts-node/register/transpile-only');
|
||||
const config=require('../../src/config').default;config.CACHE_MONITORING_ENABLED=false;
|
||||
const {BlobCache}=require('../../src/core/blob-cache');
|
||||
(async()=>{
|
||||
for(const mode of ['identity','gzip']){
|
||||
const cache=new BlobCache({root:path.join(process.argv[2],mode),budget:65536,maxObject:4096,gzip:mode==='gzip'});
|
||||
try{for(const size of mode==='gzip'?[2250]:[0,17,2250]){
|
||||
const result=await cache.getOrFill(`payload-${size}`,async()=>Readable.from([Buffer.alloc(size,120)]));
|
||||
for await(const chunk of result){};await new Promise(r=>setImmediate(r));
|
||||
}}finally{cache.close()}
|
||||
}
|
||||
})().catch(e=>{console.error(e);process.exitCode=1});
|
||||
Reference in new issue
Block a user