podverse-mq 5.1.6-alpha.2 → 5.1.6-alpha.3
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 +2 -1
- package/dist/functions/mq/rss/add.d.ts.map +1 -1
- package/dist/functions/mq/rss/add.js +3 -2
- package/dist/functions/mq/rss/addAll.d.ts +2 -1
- package/dist/functions/mq/rss/addAll.d.ts.map +1 -1
- package/dist/functions/mq/rss/addAll.js +6 -5
- package/dist/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.d.ts +2 -1
- package/dist/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.d.ts.map +1 -1
- package/dist/functions/mq/rss/addRecentlyUpdatedFeedsFromPodcastIndex.js +3 -2
- package/dist/functions/mq/rss/runLiveItemListener.d.ts.map +1 -1
- package/dist/functions/mq/rss/runLiveItemListener.js +1 -1
- package/dist/functions/mq/rss/runParser.js +2 -2
- package/dist/types/mq.d.ts +2 -0
- package/dist/types/mq.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ActiveMQArtemisService } from "@queue/services/activeMQArtemis";
|
|
2
2
|
import { MQQueueConfig } from "podverse-helpers";
|
|
3
|
+
import { ParseRSSFeedAndSaveToDatabase } from "podverse-parser";
|
|
3
4
|
type MQRSSAddOptions = MQQueueConfig & {
|
|
4
5
|
feedUrl: string;
|
|
5
6
|
podcast_index_id: number;
|
|
6
7
|
};
|
|
7
|
-
export declare const mqRSSAdd: (activeMQArtemisService: ActiveMQArtemisService, options: MQRSSAddOptions) => Promise<void>;
|
|
8
|
+
export declare const mqRSSAdd: (activeMQArtemisService: ActiveMQArtemisService, options: MQRSSAddOptions, msgOptions: ParseRSSFeedAndSaveToDatabase) => Promise<void>;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=add.d.ts.map
|
|
@@ -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;
|
|
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;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAEhE,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,EACxB,YAAY,6BAA6B,kBAgB1C,CAAC"}
|
|
@@ -10,11 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.mqRSSAdd = void 0;
|
|
13
|
-
const mqRSSAdd = (activeMQArtemisService, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
+
const mqRSSAdd = (activeMQArtemisService, options, msgOptions) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
14
|
yield activeMQArtemisService.initialize();
|
|
15
15
|
const message = {
|
|
16
16
|
url: options.feedUrl,
|
|
17
|
-
podcast_index_id: options.podcast_index_id
|
|
17
|
+
podcast_index_id: options.podcast_index_id,
|
|
18
|
+
options: msgOptions
|
|
18
19
|
};
|
|
19
20
|
yield activeMQArtemisService.sendMessage({
|
|
20
21
|
queueName: options.queueName,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActiveMQArtemisService } from "@queue/services/activeMQArtemis";
|
|
2
2
|
import { MQQueueConfig } from "podverse-helpers";
|
|
3
|
+
import { ParseRSSFeedAndSaveToDatabase } from "podverse-parser";
|
|
3
4
|
type MQRSSAddAllConfig = MQQueueConfig;
|
|
4
|
-
export declare const mqRSSAddAll: (activeMQArtemisService: ActiveMQArtemisService,
|
|
5
|
+
export declare const mqRSSAddAll: (activeMQArtemisService: ActiveMQArtemisService, options: MQRSSAddAllConfig, msgOptions: ParseRSSFeedAndSaveToDatabase) => Promise<void>;
|
|
5
6
|
export {};
|
|
6
7
|
//# sourceMappingURL=addAll.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAll.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/addAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"addAll.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/addAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAEhE,KAAK,iBAAiB,GAAG,aAAa,CAAC;AAEvC,eAAO,MAAM,WAAW,GACtB,wBAAwB,sBAAsB,EAC9C,SAAS,iBAAiB,EAC1B,YAAY,6BAA6B,kBAqB1C,CAAC"}
|
|
@@ -11,20 +11,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.mqRSSAddAll = void 0;
|
|
13
13
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
-
const mqRSSAddAll = (activeMQArtemisService,
|
|
14
|
+
const mqRSSAddAll = (activeMQArtemisService, options, msgOptions) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
15
|
const feedService = new podverse_orm_1.FeedService();
|
|
16
16
|
const feeds = yield feedService.getAll();
|
|
17
17
|
yield activeMQArtemisService.initialize();
|
|
18
18
|
for (const feed of feeds) {
|
|
19
19
|
const message = {
|
|
20
20
|
url: feed.url,
|
|
21
|
-
podcast_index_id: feed.podcast_index_id
|
|
21
|
+
podcast_index_id: feed.podcast_index_id,
|
|
22
|
+
options: msgOptions
|
|
22
23
|
};
|
|
23
24
|
yield activeMQArtemisService.sendMessage({
|
|
24
|
-
queueName:
|
|
25
|
+
queueName: options.queueName,
|
|
25
26
|
message,
|
|
26
|
-
priority:
|
|
27
|
-
dedupeCacheTimeMS:
|
|
27
|
+
priority: options.priority,
|
|
28
|
+
dedupeCacheTimeMS: options.dedupeCacheTimeMS
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PodcastIndexService } from 'podverse-external-services';
|
|
2
2
|
import { MQQueueConfig } from 'podverse-helpers';
|
|
3
3
|
import { ActiveMQArtemisService } from "@queue/services/activeMQArtemis";
|
|
4
|
+
import { ParseRSSFeedAndSaveToDatabase } from 'podverse-parser';
|
|
4
5
|
type MQRSSAddAllRecentlyUpdatedFeedsOptions = MQQueueConfig & {
|
|
5
6
|
sinceRange: number;
|
|
6
7
|
};
|
|
7
|
-
export declare const mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex: (activeMQArtemisService: ActiveMQArtemisService, podcastIndexService: PodcastIndexService, options: MQRSSAddAllRecentlyUpdatedFeedsOptions) => Promise<void>;
|
|
8
|
+
export declare const mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex: (activeMQArtemisService: ActiveMQArtemisService, podcastIndexService: PodcastIndexService, options: MQRSSAddAllRecentlyUpdatedFeedsOptions, msgOptions: ParseRSSFeedAndSaveToDatabase) => Promise<void>;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=addRecentlyUpdatedFeedsFromPodcastIndex.d.ts.map
|
|
@@ -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;
|
|
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;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAEhE,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,EAC/C,YAAY,6BAA6B,kBA4B1C,CAAC"}
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex = void 0;
|
|
13
13
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
-
const mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex = (activeMQArtemisService, podcastIndexService, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
const mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex = (activeMQArtemisService, podcastIndexService, options, msgOptions) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
15
|
const sinceRange = options.sinceRange;
|
|
16
16
|
const recentlyUpdatedFeeds = yield podcastIndexService.recentGetData(sinceRange);
|
|
17
17
|
yield activeMQArtemisService.initialize();
|
|
@@ -23,7 +23,8 @@ const mqRSSAddRecentlyUpdatedFeedsFromPodcastIndex = (activeMQArtemisService, po
|
|
|
23
23
|
if (shouldAddToQueue) {
|
|
24
24
|
const message = {
|
|
25
25
|
url: feed.feedUrl,
|
|
26
|
-
podcast_index_id: feed.feedId
|
|
26
|
+
podcast_index_id: feed.feedId,
|
|
27
|
+
options: msgOptions
|
|
27
28
|
};
|
|
28
29
|
yield activeMQArtemisService.sendMessage({
|
|
29
30
|
queueName: options.queueName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runLiveItemListener.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/runLiveItemListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAe,MAAM,iCAAiC,CAAC;AAMtF,eAAO,MAAM,wBAAwB,GACnC,wBAAwB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"runLiveItemListener.d.ts","sourceRoot":"","sources":["../../../../src/functions/mq/rss/runLiveItemListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAe,MAAM,iCAAiC,CAAC;AAMtF,eAAO,MAAM,wBAAwB,GACnC,wBAAwB,sBAAsB,SAqI/C,CAAC"}
|
|
@@ -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, podcast_index_id: 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 }), { forceParse: true });
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -18,9 +18,9 @@ const mqRSSRunParser = (activeMQArtemisService, queueName) => __awaiter(void 0,
|
|
|
18
18
|
try {
|
|
19
19
|
const bodyStr = (_b = (_a = context.message) === null || _a === void 0 ? void 0 : _a.body) !== null && _b !== void 0 ? _b : '';
|
|
20
20
|
const receivedMessage = JSON.parse(bodyStr);
|
|
21
|
-
const { url, podcast_index_id } = receivedMessage;
|
|
21
|
+
const { url, podcast_index_id, options } = receivedMessage;
|
|
22
22
|
if (url || podcast_index_id) {
|
|
23
|
-
yield (0, podverse_parser_1.parseRSSFeedAndSaveToDatabase)(url, podcast_index_id);
|
|
23
|
+
yield (0, podverse_parser_1.parseRSSFeedAndSaveToDatabase)(url, podcast_index_id, options);
|
|
24
24
|
(_c = context.delivery) === null || _c === void 0 ? void 0 : _c.accept();
|
|
25
25
|
}
|
|
26
26
|
else {
|
package/dist/types/mq.d.ts
CHANGED
package/dist/types/mq.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../src/types/mq.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../src/types/mq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,6BAA6B,CAAC;CACxC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podverse-mq",
|
|
3
|
-
"version": "5.1.6-alpha.
|
|
3
|
+
"version": "5.1.6-alpha.3",
|
|
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.6-alpha.
|
|
21
|
-
"podverse-helpers": "^5.1.6-alpha.
|
|
22
|
-
"podverse-orm": "^5.1.6-alpha.
|
|
23
|
-
"podverse-parser": "^5.1.6-alpha.
|
|
20
|
+
"podverse-external-services": "^5.1.6-alpha.3",
|
|
21
|
+
"podverse-helpers": "^5.1.6-alpha.1",
|
|
22
|
+
"podverse-orm": "^5.1.6-alpha.3",
|
|
23
|
+
"podverse-parser": "^5.1.6-alpha.3",
|
|
24
24
|
"rhea": "^2.0.6",
|
|
25
25
|
"ws": "^8.18.3"
|
|
26
26
|
},
|