(config: {
type?: ServiceType;
topics?: ServiceTopics;
})
| 695 | } |
| 696 | |
| 697 | export function getServiceQueueTopicConfigs(config: { |
| 698 | type?: ServiceType; |
| 699 | topics?: ServiceTopics; |
| 700 | }): ServiceQueueTopic[] { |
| 701 | if (Array.isArray(config.topics) && config.topics.length > 0) { |
| 702 | return typeof config.topics[0] === 'string' |
| 703 | ? (config.topics as string[]).map(topic => ({ topic })) |
| 704 | : (config.topics as ServiceQueueTopic[]); |
| 705 | } |
| 706 | |
| 707 | return config.type === 'worker' ? [{ topic: 'default' }] : []; |
| 708 | } |
| 709 | |
| 710 | export function getServiceQueueTopics(config: { |
| 711 | type?: ServiceType; |
no outgoing calls
no test coverage detected