Skip to content

Commit

Permalink
chore: cleanup debug logs
Browse files Browse the repository at this point in the history
no issue
  • Loading branch information
pociej committed Jun 18, 2024
1 parent e1f370e commit fb644f3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion deploy/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN curl -L https://join.golem.network/as-requestor --output as-requestor.sh
RUN chmod +x as-requestor.sh

ENV PATH="${PATH}:/root/.local/bin"
ENV DEBUG="task-executor:*"
# switch yagna version if necessery
ARG YAGNA_VERSION

Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/homePage/events/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const Events = () => {
timestamp: number;
}
) => {
console.log("event", event);
setEvents((prevEvents) => {
return sortBy(prop("timestamp"))(
uniqBy(
Expand All @@ -73,7 +74,7 @@ export const Events = () => {
//TODO: fix this
setTimeout(() => {
sub.unsubscribe();
}, 0);
}, 1000);
};
}, []);

Expand Down
8 changes: 7 additions & 1 deletion frontend/src/hooks/events/useEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,18 @@ export const useEvents = <K extends Event>({

useEffect(() => {
if (currentEvents) {
console.log("currentEvents", currentEvents);
currentEvents.forEach((e: any) => {
if (!previousEvents.current.find((p) => getId(p) === getId(e))) {
console.log("emitting", e);
events$.current?.next(e);
} else {
console.log("not emitting", previousEvents);
}
});
setIsFirstRun(false);
setTimeout(() => {
setIsFirstRun(false);
}, 1000);
if (!isFirstRun) {
previousEvents.current = currentEvents;
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/hooks/events/useYagnaEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export const useYagnaEvent = (event: yagnaEventTopic) => {
socketRef.current.connect();

socketRef.current.on("event", (data: any) => {
console.log("event", data, isInTopic(event)(data.event.eventType));
if (!isInTopic(event)(data.event.eventType)) return;
emit({ id: data.id, ...data[event] }, data.event.eventType);
});
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type Payload = {
agreementId: string;
invoiceId: string;
transactionId?: string;
amount: string;
};

[Event.AGREEMENT_SIGNED]: {
Expand Down

0 comments on commit fb644f3

Please sign in to comment.