Bladeren bron

refactor: one copy of the anime chain, called by the RSS loop

Extract the ten nodes from Vision Analyse through Publish To Blog into
a new sub-workflow, [SWF] anime: process one image, so a form upload
and an RSS item can run exactly the same steps instead of two copies
drifting apart. Input is one field, file.

The sub-workflow carries an eleventh node beyond the brief's ten: a
copy of the parent's old IF Condition (Did the image get made), moved
in front of Write The Post. It is not one of the named ten, but it sat
structurally between two of them, gating whether a failed generation
is safe to keep going from. Without it, a failed Generate Image would
fall through to Write The Post and Publish To Blog with no image
inside the sub-workflow - publishing broken content instead of
stopping, which is a regression from the parent's current behaviour.
A Workflow Output node reports succeeded, skipped, error, url and
postId so a caller can tell what happened without reaching into
$node[...] of nodes it no longer has.

In 35photo2anime - sdcpp, the ten nodes are gone. Is New Image (true)
now feeds a call-workflow node, Process Image, and the existing IF
Condition reads its result the same way it read Generate Image's
before. The two Nextcloud Talk messages that referenced now-gone nodes
are repointed at Process Image's result instead.

Known, accepted degradation: Store If NSFW records fileId and checksum
by finding them in upstream input, which came from Dedupe Check.
Dedupe Check stays in the parent; only file crosses into the
sub-workflow. So every NSFW record the sub-workflow stores now has
fileId and checksum empty - the code already guards for this and does
not throw, but the file-store provenance for that collection is lost
for anything run through the sub-workflow. Not fixed here: passing
that data across would mean widening the sub-workflow's input contract
for a value only this one leaf node uses, and it isn't needed for
either caller (the RSS loop or the upload form) to work.

Verified standalone (a real photo through the full chain, ending in a
published post) before touching the parent, then verified the RSS
path end to end after switching it over: two of eleven feed items
generated and published in the same run, the rest correctly skipped
without generating.
fszontagh 1 maand geleden
bovenliggende
commit
1c8d26a922
2 gewijzigde bestanden met toevoegingen van 139 en 88 verwijderingen
  1. 14 88
      deploy/workflows/35photo2anime-sdcpp.json
  2. 125 0
      deploy/workflows/swf-anime-process-one-image.json

File diff suppressed because it is too large
+ 14 - 88
deploy/workflows/35photo2anime-sdcpp.json


File diff suppressed because it is too large
+ 125 - 0
deploy/workflows/swf-anime-process-one-image.json


Some files were not shown because too many files changed in this diff