Skip to content

Commit

Permalink
fix: move location setting into definition
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Nov 20, 2023
1 parent a5b462f commit 93bccf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fetcher/src/job/job.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ export function extractFeeds(
const feeds = adapter.feeds.map((f) => {
let proxy: IProxy
try {
if (!f.location) {
if (!f.definition.location) {
proxy = proxySelector(f.definition.url)
} else {
const availableProxies = proxies.filter((item) => item.location === f.location)
const availableProxies = proxies.filter((item) => item.location === f.definition.location)
if (availableProxies.length == 0) {
throw `no proxies available for location:${f.location}`
throw `no proxies available for location:${f.definition.location}`
}
const randomIndex = Math.floor(Math.random() * availableProxies.length)
proxy = availableProxies[randomIndex]
Expand Down

0 comments on commit 93bccf9

Please sign in to comment.