podverse-parser 5.1.23-alpha.0 → 5.1.24-alpha.0

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.
@@ -13,6 +13,7 @@ export declare const config: {
13
13
  authKey: string;
14
14
  baseUrl: string;
15
15
  secretKey: string;
16
+ rateLimitDelay: number;
16
17
  };
17
18
  parser: {
18
19
  addRemoteItemsToMQ: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAC"}
@@ -15,7 +15,8 @@ exports.config = {
15
15
  podcastIndex: {
16
16
  authKey: process.env.PODCAST_INDEX_AUTH_KEY || '',
17
17
  baseUrl: process.env.PODCAST_INDEX_BASE_URL || '',
18
- secretKey: process.env.PODCAST_INDEX_SECRET_KEY || ''
18
+ secretKey: process.env.PODCAST_INDEX_SECRET_KEY || '',
19
+ rateLimitDelay: parseInt(process.env.PODCAST_INDEX_API_RATE_LIMIT_DELAY || '200', 10)
19
20
  },
20
21
  parser: {
21
22
  addRemoteItemsToMQ: process.env.PARSER_ADD_REMOTE_ITEMS_TO_MQ === 'true',
@@ -1 +1 @@
1
- {"version":3,"file":"remoteItemParser.d.ts","sourceRoot":"","sources":["../../../src/lib/rss/remoteItemParser.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EAUR,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,wBAAwB,CAAC;AAQnF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;CACpC,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,oCAAoC,CAAC;CAC/C,CAAA;AA4DD,eAAO,MAAM,+BAA+B,GAAU,SAAS,OAAO,EAAE,QAAQ,8BAA8B,KAAG,OAAO,CAAC,uBAAuB,EAAE,CAWjJ,CAAC"}
1
+ {"version":3,"file":"remoteItemParser.d.ts","sourceRoot":"","sources":["../../../src/lib/rss/remoteItemParser.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EAUR,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,wBAAwB,CAAC;AASnF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;CACpC,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,oCAAoC,CAAC;CAC/C,CAAA;AA4DD,eAAO,MAAM,+BAA+B,GAAU,SAAS,OAAO,EAAE,QAAQ,8BAA8B,KAAG,OAAO,CAAC,uBAAuB,EAAE,CAWjJ,CAAC"}
@@ -14,6 +14,7 @@ const podverse_helpers_1 = require("podverse-helpers");
14
14
  const podverse_orm_1 = require("podverse-orm");
15
15
  const podcastIndex_1 = require("@parser/factories/podcastIndex");
16
16
  const loggerService_1 = require("@parser/factories/loggerService");
17
+ const config_1 = require("@parser/config");
17
18
  const handleRemoteItemsFeedParsing = (feedGuidsToParse, params) => __awaiter(void 0, void 0, void 0, function* () {
18
19
  var _a, _b;
19
20
  const { accountId, remoteParentPodcastIndexId } = params;
@@ -29,7 +30,7 @@ const handleRemoteItemsFeedParsing = (feedGuidsToParse, params) => __awaiter(voi
29
30
  const feedService = new podverse_orm_1.FeedService();
30
31
  const pvExistingFeed = yield feedService.getByPodcastGuid(feedGuid);
31
32
  if (!pvExistingFeed) {
32
- const piFeedDataResponse = yield podcastIndex_1.podcastIndexService.podcastGetByGuid(feedGuid);
33
+ const piFeedDataResponse = yield podcastIndex_1.podcastIndexService.podcastGetByGuid(feedGuid, config_1.config.podcastIndex.rateLimitDelay);
33
34
  if (((_a = piFeedDataResponse === null || piFeedDataResponse === void 0 ? void 0 : piFeedDataResponse.feed) === null || _a === void 0 ? void 0 : _a.id) && ((_b = piFeedDataResponse === null || piFeedDataResponse === void 0 ? void 0 : piFeedDataResponse.feed) === null || _b === void 0 ? void 0 : _b.url)) {
34
35
  const piFeedData = {
35
36
  id: piFeedDataResponse.feed.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podverse-parser",
3
- "version": "5.1.23-alpha.0",
3
+ "version": "5.1.24-alpha.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,10 +17,10 @@
17
17
  "license": "AGPLv3",
18
18
  "dependencies": {
19
19
  "module-alias": "^2.2.3",
20
- "podverse-external-services": "^5.1.23-alpha.0",
21
- "podverse-helpers": "^5.1.23-alpha.0",
22
- "podverse-notifications": "^5.1.23-alpha.0",
23
- "podverse-orm": "^5.1.23-alpha.0",
20
+ "podverse-external-services": "^5.1.24-alpha.0",
21
+ "podverse-helpers": "^5.1.24-alpha.0",
22
+ "podverse-notifications": "^5.1.24-alpha.0",
23
+ "podverse-orm": "^5.1.24-alpha.0",
24
24
  "podverse-partytime": "^5.0.0"
25
25
  },
26
26
  "devDependencies": {