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.
- package/dist/functions/mq/rss/add.d.ts +1 -1
- package/dist/functions/mq/rss/add.d.ts.map +1 -1
- package/dist/functions/mq/rss/add.js +1 -1
- package/dist/functions/mq/rss/addAll.js +1 -1
- package/dist/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.d.ts.map +1 -1
- package/dist/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.js +2 -1
- package/dist/functions/mq/rss/runLiveItemListener.js +3 -3
- package/package.json +5 -5
|
@@ -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
|
-
|
|
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,
|
|
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.
|
|
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.
|
|
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,
|
|
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
|
|
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
|
|
75
|
-
const { podcast_index_id } = feed
|
|
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,
|
|
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.
|
|
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.
|
|
21
|
-
"podverse-helpers": "^5.1.4-alpha.
|
|
22
|
-
"podverse-orm": "^5.1.4-alpha.
|
|
23
|
-
"podverse-parser": "^5.1.4-alpha.
|
|
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
|
},
|