podverse-mq 5.1.4-alpha.1 → 5.1.4-alpha.2

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.
@@ -2,7 +2,7 @@ import { ActiveMQArtemisService } from "@queue/services/activeMQArtemis";
2
2
  import { MQQueueConfig } from "podverse-helpers";
3
3
  type MQRSSAddOptions = MQQueueConfig & {
4
4
  feedUrl: string;
5
- podcastIndexId: number;
5
+ podcast_index_id: number;
6
6
  };
7
7
  export declare const mqRSSAdd: (activeMQArtemisService: ActiveMQArtemisService, options: MQRSSAddOptions) => Promise<void>;
8
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,KAAK,eAAe,GAAG,aAAa,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAA;AAED,eAAO,MAAM,QAAQ,GACnB,wBAAwB,sBAAsB,EAC9C,SAAS,eAAe,kBAezB,CAAC"}
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,KAAK,eAAe,GAAG,aAAa,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,GACnB,wBAAwB,sBAAsB,EAC9C,SAAS,eAAe,kBAezB,CAAC"}
@@ -14,7 +14,7 @@ const mqRSSAdd = (activeMQArtemisService, options) => __awaiter(void 0, void 0,
14
14
  yield activeMQArtemisService.initialize();
15
15
  const message = {
16
16
  url: options.feedUrl,
17
- podcast_index_id: options.podcastIndexId
17
+ podcast_index_id: options.podcast_index_id
18
18
  };
19
19
  yield activeMQArtemisService.sendMessage({
20
20
  queueName: options.queueName,
@@ -18,7 +18,7 @@ const mqRSSAddAll = (activeMQArtemisService, config) => __awaiter(void 0, void 0
18
18
  for (const feed of feeds) {
19
19
  const message = {
20
20
  url: feed.url,
21
- podcast_index_id: feed.channel.podcast_index_id
21
+ podcast_index_id: feed.podcast_index_id
22
22
  };
23
23
  yield activeMQArtemisService.sendMessage({
24
24
  queueName: config.queueName,
@@ -1 +1 @@
1
- {"version":3,"file":"addRecentlyUpdatedFeedsFromPodcastIndex.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,KAAK,sCAAsC,GAAG,aAAa,GAAG;IAC5D,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,eAAO,MAAM,4CAA4C,GACvD,wBAAwB,sBAAsB,EAC9C,qBAAqB,mBAAmB,EACxC,SAAS,sCAAsC,kBA0BhD,CAAC"}
1
+ {"version":3,"file":"addRecentlyUpdatedFeedsFromPodcastIndex.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,KAAK,sCAAsC,GAAG,aAAa,GAAG;IAC5D,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,eAAO,MAAM,4CAA4C,GACvD,wBAAwB,sBAAsB,EAC9C,qBAAqB,mBAAmB,EACxC,SAAS,sCAAsC,kBA2BhD,CAAC"}
@@ -17,7 +17,8 @@ const mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex = (activeMQArtemisService, po
17
17
  yield activeMQArtemisService.initialize();
18
18
  for (const feed of recentlyUpdatedFeeds) {
19
19
  const feedService = new podverse_orm_1.FeedService();
20
- const dbFeed = yield feedService.getByPodcastIndexId({ podcast_index_id: feed.feedId });
20
+ const podcast_index_id = feed.feedId;
21
+ const dbFeed = yield feedService.getByPodcastIndexId(podcast_index_id);
21
22
  const shouldAddToQueue = !!dbFeed;
22
23
  if (shouldAddToQueue) {
23
24
  const message = {
@@ -71,8 +71,8 @@ const mqRSSRunLiveItemListener = (activeMQArtemisService) => {
71
71
  catch (error) {
72
72
  console.info(`p.p.iris error ${error}, connectionId: ${connectionId}`);
73
73
  }
74
- if (feed === null || feed === void 0 ? void 0 : feed.channel) {
75
- const { podcast_index_id } = feed.channel;
74
+ if (feed) {
75
+ const { podcast_index_id } = feed;
76
76
  const numPodcastIndexId = Number(podcast_index_id);
77
77
  if (podcast_index_id)
78
78
  addRSSObjs.push({ url, podcast_index_id: numPodcastIndexId });
@@ -89,7 +89,7 @@ const mqRSSRunLiveItemListener = (activeMQArtemisService) => {
89
89
  const queueType = 'rss-live';
90
90
  const mqConstantMessageOptions = podverse_helpers_1.MQ_QUEUES[queueType];
91
91
  for (const addRSSObj of addRSSObjs) {
92
- yield (0, add_1.mqRSSAdd)(activeMQArtemisService, Object.assign(Object.assign({}, mqConstantMessageOptions), { feedUrl: addRSSObj.url, podcastIndexId: addRSSObj.podcast_index_id }));
92
+ yield (0, add_1.mqRSSAdd)(activeMQArtemisService, Object.assign(Object.assign({}, mqConstantMessageOptions), { feedUrl: addRSSObj.url, podcast_index_id: addRSSObj.podcast_index_id }));
93
93
  }
94
94
  }
95
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podverse-mq",
3
- "version": "5.1.4-alpha.1",
3
+ "version": "5.1.4-alpha.2",
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.4-alpha.0",
21
- "podverse-helpers": "^5.1.4-alpha.1",
22
- "podverse-orm": "^5.1.4-alpha.1",
23
- "podverse-parser": "^5.1.4-alpha.0",
20
+ "podverse-external-services": "^5.1.4-alpha.1",
21
+ "podverse-helpers": "^5.1.4-alpha.2",
22
+ "podverse-orm": "^5.1.4-alpha.2",
23
+ "podverse-parser": "^5.1.4-alpha.1",
24
24
  "rhea": "^2.0.6",
25
25
  "ws": "^8.18.3"
26
26
  },