Skip to content

Commit

Permalink
Revert "Turn off polling of non-priority feeds (#2167)" (#2170)
Browse files Browse the repository at this point in the history
This reverts commit 2a2ffe1.
  • Loading branch information
ichub authored Nov 13, 2024
1 parent 06dd129 commit de3bd2e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 44 deletions.
6 changes: 0 additions & 6 deletions apps/passport-client/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,3 @@ DISABLE_CONSOLE_LOG=

# Some origins are allowed to query Devcon tickets directly. Origins not in this list cannot do so:
DEVCON_TICKET_QUERY_ORIGINS='["http://example.com", "http://localhost:3200"]'

# If IGNORE_NON_PRIORITY_FEEDS=true, then non-priority feeds will be ignored.
IGNORE_NON_PRIORITY_FEEDS=false

# URLs of feed providers that are priority feeds.
PRIORITY_FEED_PROVIDER_URLS='[]'
14 changes: 0 additions & 14 deletions apps/passport-client/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,6 @@ const define = {
process.env.DEVCON_TICKET_QUERY_ORIGINS
)
}
: {}),
...(process.env.IGNORE_NON_PRIORITY_FEEDS !== undefined
? {
"process.env.IGNORE_NON_PRIORITY_FEEDS": JSON.stringify(
process.env.IGNORE_NON_PRIORITY_FEEDS
)
}
: {}),
...(process.env.PRIORITY_FEED_PROVIDER_URLS !== undefined
? {
"process.env.PRIORITY_FEED_PROVIDER_URLS": JSON.stringify(
process.env.PRIORITY_FEED_PROVIDER_URLS
)
}
: {})
};

Expand Down
10 changes: 1 addition & 9 deletions apps/passport-client/src/appConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ interface AppConfig {
embeddedZapps: Record<string, string>;
// origins that are allowed to query Devcon tickets directly
devconTicketQueryOrigins: string[];
// If IGNORE_NON_PRIORITY_FEEDS=true, then non-priority feeds will be ignored.
ignoreNonPriorityFeeds: boolean;
// URLs of feed providers that are priority feeds.
priorityFeedProviderUrls: string[];
}

if (
Expand Down Expand Up @@ -88,11 +84,7 @@ export const appConfig: AppConfig = {
zappRestrictOrigins: process.env.ZAPP_RESTRICT_ORIGINS === "true",
zappAllowedSignerOrigins: zappAllowedSignerOrigins,
embeddedZapps: embeddedZapps,
devconTicketQueryOrigins: devconTicketQueryOrigins,
ignoreNonPriorityFeeds: process.env.IGNORE_NON_PRIORITY_FEEDS === "true",
priorityFeedProviderUrls: process.env.PRIORITY_FEED_PROVIDER_URLS
? JSON.parse(process.env.PRIORITY_FEED_PROVIDER_URLS)
: []
devconTicketQueryOrigins: devconTicketQueryOrigins
};

console.log("App Config: " + JSON.stringify(appConfig));
17 changes: 4 additions & 13 deletions apps/passport-client/src/dispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1160,23 +1160,14 @@ async function doSync(
onSubscriptionResult,
state.subscriptions
.getActiveSubscriptions()
.filter((s) => {
if (
s.id ===
.filter(
(s) =>
s.id !==
state.subscriptions.findSubscription(
ZUPASS_FEED_URL,
ZupassFeedIds.Email
)?.id
) {
return false;
}

if (appConfig.ignoreNonPriorityFeeds) {
return appConfig.priorityFeedProviderUrls.includes(s.providerUrl);
}

return true;
})
)
.map((s) => s.id)
);

Expand Down
2 changes: 0 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@
"DEVCON_TICKET_QUERY_ORIGINS",
"GENERATED_CHUNKS",
"TELEGRAM_CHAT_TO_PRODUCT_IDS",
"IGNORE_NON_PRIORITY_FEEDS",
"PRIORITY_FEED_PROVIDER_URLS",
"//// add env vars above this line ////"
],
"globalEnv": [
Expand Down

0 comments on commit de3bd2e

Please sign in to comment.