@hadoku/jobplatform-worker 2.32.76 → 2.32.77

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/dist/index.js CHANGED
@@ -2937,15 +2937,19 @@ app$5.openapi(ingestRoute, async (c) => {
2937
2937
  );
2938
2938
  }
2939
2939
  }
2940
+ let drifted = 0;
2940
2941
  for (const j of seen) {
2941
2942
  const row = byId.get(j.id);
2942
2943
  if (!row || row.url === j.url) continue;
2944
+ drifted++;
2943
2945
  writes.push(db.prepare("UPDATE jobs SET last_seen_at = ? WHERE id = ?").bind(now, row.id));
2944
2946
  writes.push(db.prepare("UPDATE OR IGNORE jobs SET url = ? WHERE id = ?").bind(j.url, row.id));
2945
2947
  }
2948
+ let restored = 0;
2946
2949
  for (const j of seen) {
2947
2950
  const row = byUrl.get(j.url) ?? byId.get(j.id);
2948
2951
  if (row?.blank && j.description !== "") {
2952
+ restored++;
2949
2953
  writes.push(
2950
2954
  db.prepare(`UPDATE jobs SET description = ? WHERE id = ? AND description = ''`).bind(j.description, row.id)
2951
2955
  );
@@ -2960,21 +2964,26 @@ app$5.openapi(ingestRoute, async (c) => {
2960
2964
  await rankNewJobs(db);
2961
2965
  endTime(c, "rank");
2962
2966
  }
2963
- recordEvent(c, {
2964
- level: "info",
2965
- event: "ingest.batch",
2966
- message: `${source}${board_slug ? `/${board_slug}` : ""} #${batch_number}: ${accepted} new of ${received.length}`,
2967
- context: {
2968
- source,
2969
- board_slug: board_slug ?? null,
2970
- batch_number,
2971
- is_final,
2972
- received: received.length,
2973
- test_board_dropped: received.length - jobs.length,
2974
- accepted,
2975
- already_known: jobs.length - accepted
2976
- }
2977
- });
2967
+ const dropped = received.length - jobs.length;
2968
+ if (accepted > 0 || dropped > 0 || drifted > 0 || restored > 0) {
2969
+ recordEvent(c, {
2970
+ level: "info",
2971
+ event: "ingest.batch",
2972
+ message: `${source}${board_slug ? `/${board_slug}` : ""} #${batch_number}: ${accepted} new of ${received.length}`,
2973
+ context: {
2974
+ source,
2975
+ board_slug: board_slug ?? null,
2976
+ batch_number,
2977
+ is_final,
2978
+ received: received.length,
2979
+ test_board_dropped: dropped,
2980
+ accepted,
2981
+ already_known: jobs.length - accepted,
2982
+ url_adopted: drifted,
2983
+ description_restored: restored
2984
+ }
2985
+ });
2986
+ }
2978
2987
  return c.json(
2979
2988
  {
2980
2989
  success: true,
@@ -1 +1 @@
1
- {"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../src/routes/ingest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAmB9E,UAAU,YAAY;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC9C;AAygCD,eAAO,MAAM,YAAY,oCAAM,CAAC"}
1
+ {"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../src/routes/ingest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAmB9E,UAAU,YAAY;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC9C;AAyhCD,eAAO,MAAM,YAAY,oCAAM,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/jobplatform-worker",
3
- "version": "2.32.76",
4
- "gitHead": "834855d53c438fbf5cdaca340149aab05a273f2f",
3
+ "version": "2.32.77",
4
+ "gitHead": "f78b787849a4fec09d1948945bc8dd4706f37e7e",
5
5
  "description": "Job listings aggregation and tracking dashboard - Worker package",
6
6
  "license": "MIT",
7
7
  "type": "module",