Skip to content

Commit 7ec278a

Browse files
committed
Nick: fixes
1 parent 134de67 commit 7ec278a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

apps/api/src/lib/extract/team-id-sync.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { supabase_rr_service, supabase_service } from "../../services/supabase";
22
import { logger } from "../logger";
33

4-
export async function getTeamIdSyncB(teamId: string) {
4+
import { withAuth } from "../withAuth";
5+
6+
async function getTeamIdSyncBOriginal(teamId: string) {
57
try {
68
const { data, error } = await supabase_rr_service
79
.from("eb-sync")
@@ -17,3 +19,5 @@ export async function getTeamIdSyncB(teamId: string) {
1719
return null;
1820
}
1921
}
22+
23+
export const getTeamIdSyncB = withAuth(getTeamIdSyncBOriginal, null);

apps/api/src/services/queue-jobs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async function addScrapeJobRaw(
7979
// If above by 2x, send them an email
8080
// No need to 2x as if there are more than the max concurrency in the concurrency queue, it is already 2x
8181
if(concurrencyQueueJobs > maxConcurrency) {
82-
logger.info("Concurrency limited 2x (single) - ", "Concurrency queue jobs: ", concurrencyQueueJobs, "Max concurrency: ", maxConcurrency);
82+
logger.info("Concurrency limited 2x (single) - ", "Concurrency queue jobs: ", concurrencyQueueJobs, "Max concurrency: ", maxConcurrency, "Team ID: ", webScraperOptions.team_id);
8383
// sendNotificationWithCustomDays(webScraperOptions.team_id, NotificationType.CONCURRENCY_LIMIT_REACHED, 10, false).catch((error) => {
8484
// logger.error("Error sending notification (concurrency limit reached): ", error);
8585
// });
@@ -168,7 +168,7 @@ export async function addScrapeJobs(
168168

169169
// equals 2x the max concurrency
170170
if(addToCQ.length > maxConcurrency) {
171-
logger.info("Concurrency limited 2x (multiple) - ", "Concurrency queue jobs: ", addToCQ.length, "Max concurrency: ", maxConcurrency);
171+
logger.info("Concurrency limited 2x (multiple) - ", "Concurrency queue jobs: ", addToCQ.length, "Max concurrency: ", maxConcurrency, "Team ID: ", jobs[0].data.team_id);
172172
// sendNotificationWithCustomDays(jobs[0].data.team_id, NotificationType.CONCURRENCY_LIMIT_REACHED, 10, false).catch((error) => {
173173
// logger.error("Error sending notification (concurrency limit reached): ", error);
174174
// });

0 commit comments

Comments
 (0)