Skip to content

Commit

Permalink
fix(cu): handle edge case where no memory is produced from evaluation…
Browse files Browse the repository at this point in the history
… stream
  • Loading branch information
TillaTheHun0 committed Oct 17, 2024
1 parent b5c0a77 commit 9518d7d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion servers/cu/src/domain/lib/evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,16 @@ export function evaluateWith (env) {
* Make sure to attempt to cache the last result
* in the process memory cache
*
* Memory being falsey is a special case, in which
* _all_ messages, from the beginning resulted in an error,
* so all resultant memory was discarded. In this case,
* there is no memory to cache, and so nothing to do. Skip.
*
* TODO: could probably make this cleaner
*/
const { noSave, cron, ordinate, message } = prev
if (!noSave) {

if (!noSave && prev.Memory) {
await saveLatestProcessMemory({
processId: ctx.id,
moduleId: ctx.moduleId,
Expand Down

0 comments on commit 9518d7d

Please sign in to comment.