@smart-cloud/publisher-exporter 1.1.64 → 1.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -22
- package/dist/content-sync.js +15 -11
- package/dist/crawl.js +13 -9
- package/dist/deploy.js +6 -5
- package/dist/invalidate.js +2 -2
- package/dist/queue-runner.js +3 -3
- package/dist/remote-worker-health.js +1 -1
- package/dist/remote-worker.js +3 -3
- package/package.json +2 -1
- package/publisher.config.example.json +2 -9
- package/remote-workers.example.json +4 -0
package/README.md
CHANGED
|
@@ -174,14 +174,14 @@ Prune old archive directories with `publisher-exporter prune-logs --runtime-dir
|
|
|
174
174
|
## Optional Lambda workers
|
|
175
175
|
|
|
176
176
|
The exporter includes protocol-v1 building blocks for delegating bounded
|
|
177
|
-
render, text-rewrite, and S3 deploy-copy tasks to container-image Lambda
|
|
177
|
+
render, asset-fetch, text-rewrite, and S3 deploy-copy tasks to container-image Lambda
|
|
178
178
|
functions. Large payloads do not travel in the Lambda response: workers write
|
|
179
|
-
HTML and detailed results below a configured S3 workspace prefix and return a
|
|
179
|
+
HTML, assets, and detailed results below a configured S3 workspace prefix and return a
|
|
180
180
|
small `resultKey` pointer. Reusing the same job/task ID is idempotent.
|
|
181
181
|
|
|
182
182
|
The companion CDK application is maintained separately at
|
|
183
183
|
[`smartcloudsol/static-publisher-lambda-workers`](https://github.com/smartcloudsol/static-publisher-lambda-workers).
|
|
184
|
-
|
|
184
|
+
Its deploy script emits a `remote-workers.json` containing the
|
|
185
185
|
versioned Lambda alias ARNs, workspace bucket/prefix, region, and generated
|
|
186
186
|
assumable role. The file contains no static AWS access keys.
|
|
187
187
|
|
|
@@ -194,31 +194,52 @@ publisher-exporter remote-worker-health \
|
|
|
194
194
|
--runtime-dir /srv/site/runtime
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
Protocol v1 accepts 1-20 same-origin URLs per render task.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
Protocol v1 accepts 1-20 same-origin URLs per render task. The default render
|
|
198
|
+
batch size is 5, so a warm Chromium process can render several pages
|
|
199
|
+
sequentially in one invocation while Lambda concurrency supplies parallelism
|
|
200
|
+
between batches. Only failed or deferred URLs are retried. The Lambda response
|
|
201
|
+
is not the rendered body; read the returned S3 result object using the same
|
|
202
|
+
temporary role credentials.
|
|
203
|
+
|
|
204
|
+
Enable unified Lambda processing in the Static Publisher WordPress admin. The
|
|
205
|
+
single Processing concurrency value is dual-written to the legacy per-phase
|
|
206
|
+
fields for mixed-version compatibility. In unified mode, HTML and asset bodies
|
|
207
|
+
remain in the workspace through rewrite and direct S3-to-S3 deployment; the
|
|
208
|
+
coordinator transfers only task/result metadata. Older mixed phase settings
|
|
209
|
+
remain supported until an administrator changes the common controls. A current
|
|
210
|
+
`remote-workers.json` must contain render, asset, rewrite, and deploy-copy aliases.
|
|
211
|
+
When it also contains `status.tableName`, the exporter reads strongly consistent
|
|
212
|
+
DynamoDB heartbeats while a synchronous Lambda invocation is running and
|
|
213
|
+
forwards them to the existing runtime progress snapshot. Workers write those
|
|
214
|
+
rows directly with conditionally increasing sequence numbers.
|
|
215
|
+
|
|
216
|
+
Rewrite requests carry the original object MIME type, and workers preserve it
|
|
217
|
+
when writing transformed HTML, CSS, JavaScript, or other text back to S3. After
|
|
218
|
+
upgrading from an earlier delegated rewrite implementation, republish affected
|
|
219
|
+
targets to replace already incorrect object metadata.
|
|
220
|
+
|
|
221
|
+
The saved runtime configuration remains compatible with older exporters:
|
|
204
222
|
|
|
205
223
|
```json
|
|
206
224
|
{
|
|
225
|
+
"lambdaDelegationEnabled": true,
|
|
226
|
+
"processingConcurrency": 4,
|
|
207
227
|
"remoteWorkers": {
|
|
208
228
|
"render": {
|
|
209
229
|
"enabled": true,
|
|
210
230
|
"concurrency": 4,
|
|
231
|
+
"batchSize": 5,
|
|
211
232
|
"maxAttempts": 2
|
|
212
233
|
},
|
|
213
234
|
"rewrite": {
|
|
214
235
|
"enabled": true,
|
|
215
|
-
"concurrency":
|
|
236
|
+
"concurrency": 4,
|
|
216
237
|
"batchSize": 25,
|
|
217
238
|
"maxAttempts": 2
|
|
218
239
|
},
|
|
219
240
|
"deploy": {
|
|
220
241
|
"enabled": true,
|
|
221
|
-
"concurrency":
|
|
242
|
+
"concurrency": 4,
|
|
222
243
|
"batchSize": 50,
|
|
223
244
|
"maxAttempts": 2
|
|
224
245
|
}
|
|
@@ -235,16 +256,15 @@ STATIC_PUBLISHER_RUNTIME_DIR=/srv/site/runtime \
|
|
|
235
256
|
publisher-exporter crawl --remote-render
|
|
236
257
|
```
|
|
237
258
|
|
|
238
|
-
Use `--local-render`
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
deploy
|
|
247
|
-
target. Only explicit deploy-plan tombstones may be deleted. Each completed
|
|
259
|
+
Use `--local-render` only as a legacy render diagnostic override; it disables
|
|
260
|
+
the unified remote data path for that crawl. The coordinator keeps sitemap
|
|
261
|
+
discovery, incremental and safety decisions, compact manifests, and deploy
|
|
262
|
+
planning local. Admitted pages are grouped into bounded Lambda batches. Their
|
|
263
|
+
HTML stays in S3, while each result returns discovered pages/assets and an
|
|
264
|
+
object reference. Asset workers fetch and inspect bounded URL batches. Final text
|
|
265
|
+
objects are rewritten in place by Lambda, then deploy workers check or copy
|
|
266
|
+
them directly from the workspace to the allowlisted target. Only explicit
|
|
267
|
+
deploy-plan tombstones may be deleted. Each completed
|
|
248
268
|
batch updates phase-scoped runtime progress and adds a structured batch summary
|
|
249
269
|
to `deploy.log.jsonl`; debug logging also records each returned object result.
|
|
250
270
|
There is no silent local fallback for any
|