Skip to content

Commit

Permalink
🧹 Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
foysalit committed Dec 12, 2024
1 parent d15cadb commit ccf8f30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions components/mod-event/helpers/emitEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ const emitEventsInBulk = async ({
})
results.succeeded.push(sub)
} catch (err) {
console.error(err)
results.failed.push(sub)
}
}),
Expand Down Expand Up @@ -209,7 +208,13 @@ export const useActionSubjects = () => {
failed: [],
}

for (const chunk of chunkArray(subjects, 50)) {
// Emails have a lower limit per second so we want to make sure we are well below that
const chunkSize = ToolsOzoneModerationDefs.isModEventEmail(
eventData.event,
)
? 25
: 50
for (const chunk of chunkArray(subjects, chunkSize)) {
const { succeeded, failed } = await emitEventsInBulk({
labelerAgent,
createSubjectFromId,
Expand Down
3 changes: 2 additions & 1 deletion components/workspace/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export function WorkspacePanel(props: PropsOf<typeof ActionPanel>) {
formRef.current?.querySelectorAll<HTMLInputElement>(
'input[type="checkbox"][name="workspaceItem"]:checked',
) || [],
).map((checkbox) => checkbox.value)
(checkbox) => checkbox.value,
)
}

const handleRemoveSelected = () => {
Expand Down

0 comments on commit ccf8f30

Please sign in to comment.