podverse-mq 5.0.0 → 5.0.6
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.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './module-alias-config';
|
|
2
|
-
export { mqRSSAdd } from './functions/
|
|
3
|
-
export { mqRSSAddAll } from './functions/
|
|
4
|
-
export { mqRSSRunParser } from './functions/
|
|
2
|
+
export { mqRSSAdd } from './functions/mq/rss/add';
|
|
3
|
+
export { mqRSSAddAll } from './functions/mq/rss/addAll';
|
|
4
|
+
export { mqRSSRunParser } from './functions/mq/rss/runParser';
|
|
5
5
|
export { ActiveMQArtemisService, ActiveMQArtemisServiceParams } from './services/activeMQArtemis';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PodcastIndexService } from 'podverse-external-services';
|
|
2
|
-
import { MQQueueConfig } from 'podverse-helpers';
|
|
3
|
-
import { ActiveMQArtemisService } from '@queue/services/activeMQArtemis';
|
|
4
|
-
type AddTrendingPodcastsOptions = MQQueueConfig & {
|
|
5
|
-
maxFeeds?: number;
|
|
6
|
-
};
|
|
7
|
-
export declare const mqRSSAddTrendingPodcastsFromPodcastIndex: (activeMQArtemisService: ActiveMQArtemisService, podcastIndexService: PodcastIndexService, options: AddTrendingPodcastsOptions) => Promise<void>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=addTrendingPodcastsFromPodcastIndex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addTrendingPodcastsFromPodcastIndex.d.ts","sourceRoot":"","sources":["../../../../src/functions/queue/rss/addTrendingPodcastsFromPodcastIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,KAAK,0BAA0B,GAAG,aAAa,GAAG;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,wCAAwC,GACnD,wBAAwB,sBAAsB,EAC9C,qBAAqB,mBAAmB,EACxC,SAAS,0BAA0B,KAClC,OAAO,CAAC,IAAI,CAyBd,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.mqRSSAddTrendingPodcastsFromPodcastIndex = void 0;
|
|
13
|
-
const mqRSSAddTrendingPodcastsFromPodcastIndex = (activeMQArtemisService, podcastIndexService, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
-
const { queueName, maxFeeds = 1000 } = options;
|
|
15
|
-
try {
|
|
16
|
-
const { feeds } = yield podcastIndexService.trendingGetPodcasts(maxFeeds);
|
|
17
|
-
yield activeMQArtemisService.initialize();
|
|
18
|
-
for (const feed of feeds) {
|
|
19
|
-
const message = {
|
|
20
|
-
url: feed.url,
|
|
21
|
-
podcast_index_id: feed.id
|
|
22
|
-
};
|
|
23
|
-
yield activeMQArtemisService.sendMessage({
|
|
24
|
-
queueName,
|
|
25
|
-
message,
|
|
26
|
-
priority: options.priority,
|
|
27
|
-
dedupeCacheTimeMS: options.dedupeCacheTimeMS
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
console.error('[mqRSSAddTrendingPodcastsFromPodcastIndex] Error adding trending podcasts:', error);
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
exports.mqRSSAddTrendingPodcastsFromPodcastIndex = mqRSSAddTrendingPodcastsFromPodcastIndex;
|