Load of DeepSeek: the start wait is at most the 600 s Control allows
This commit is contained in:
1 parent
f30d191d54
commit
9cf91f3555
2 files changed
+2
-2
No files matched your search
@@ -295,7 +295,7 @@ return {summary:result.summary??'Deleted',removed:result.plan?.gb??null};}
|
||||
/* The engine starts under Control's owner runtime, not as our child: a saved profile per slot, then `runtime start`. */
|
||||
const used=new Set([...instances.values()].map(i=>i.profile));let slot=1;while(used.has('app-'+slot))slot++;instance.profile='app-'+slot;
|
||||
instances.set(id,instance);if(!defaultId||!args.multiple||wasDefault)defaultId=id;emit();
|
||||
const startWith=value=>{writeFileSync(configPath,JSON.stringify(value,null,2),{mode:0o600});return control.stop(instance.profile).catch(()=>{}).then(()=>control.saveProfile(instance.profile,configPath)).then(()=>control.start(instance.profile,{waitSeconds:ownEngine(config)?Math.max(300,Number(config.engine_ready_s)||300):300}));};
|
||||
const startWith=value=>{writeFileSync(configPath,JSON.stringify(value,null,2),{mode:0o600});return control.stop(instance.profile).catch(()=>{}).then(()=>control.saveProfile(instance.profile,configPath)).then(()=>control.start(instance.profile,{waitSeconds:ownEngine(config)?Math.min(600,Math.max(300,Number(config.engine_ready_s)||300)):300}));};
|
||||
started=startWith(cfg);
|
||||
started.then(()=>append(id,'Strata Control reports the engine is ready.'),error=>{append(id,error.message);});
|
||||
try{await started;}catch(firstError){let error=firstError;
|
||||
|
||||
@@ -214,7 +214,7 @@ test('packaged: a model id with dots (DeepSeek) is listed, loaded from its run c
|
||||
assert.deepEqual(f.calls.filter(c => ['saveProfile', 'start'].includes(c[0])).map(c => c.slice(0, 2)), [['saveProfile', 'app-1'], ['start', 'app-1']]);
|
||||
const flags = f.saved[0].args.filter(a => a.startsWith('--'));
|
||||
assert.deepEqual(flags, ['--pack', '--max-context', '--eos'], 'The own engine of DeepSeek gets none of the Flash-Next options (it ended with "unknown option --batch")');
|
||||
assert.equal(f.calls.find(c => c[0] === 'start')[2], 3600, 'it waits as long as the config says the engine needs');
|
||||
assert.equal(f.calls.find(c => c[0] === 'start')[2], 600, 'it waits longer than the usual 300 s, up to the 600 s Control allows');
|
||||
const instance = f.native.state().instances[0];
|
||||
assert.equal(instance.model, id);
|
||||
assert.equal(instance.status, 'ready');
|
||||
|
||||
Reference in new issue
Block a user