Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(seatool deletes): When a record is deleted in seatool, it should be deleted from our system. #370

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/services/data/handlers/sinkSeatool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
};

export const seatool_main = async (event: KafkaEvent) => {
const docs: any[] = [];

Check warning on line 19 in src/services/data/handlers/sinkSeatool.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const records: any = {};

Check warning on line 20 in src/services/data/handlers/sinkSeatool.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

for (const recordKey of Object.keys(event.records)) {
for (const seatoolRecord of event.records[recordKey]) {
Expand Down Expand Up @@ -52,7 +52,8 @@
submissionDate: null,
subject: null,
};
return;
console.log(`SEATOOL DELETE EVENT: ${id}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know this isn't really related, but i think we should have some way of ensuring that these list of fields are pulled from someone what ensures this inclues all the possible field for these records. cause at some point its gonna be forgotten. im not where where to get that list for.... but could be a good follow on ticket. thoughts?

continue;
}

// Handle everything else
Expand Down Expand Up @@ -101,7 +102,7 @@
});

return ACC;
}, [] as any[]);

Check warning on line 105 in src/services/data/handlers/sinkSeatool.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

try {
await os.bulkUpdateData(osDomain, "seatool", data);
Expand Down
Loading