Skip to content

Commit

Permalink
No need to persist file operation update events
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Oct 2, 2023
1 parent 7bea3c4 commit d4e9f87
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions server/queues/tasks/ImportTask.ts
Expand Up @@ -164,9 +164,20 @@ export default abstract class ImportTask extends BaseTask<Props> {
state: FileOperationState,
error?: Error
) {
await fileOperation.update({
state,
error: error ? truncate(error.message, { length: 255 }) : undefined,
await fileOperation.update(
{
state,
error: error ? truncate(error.message, { length: 255 }) : undefined,
},
{
hooks: false,
}
);
await Event.schedule({
name: "fileOperations.update",
modelId: fileOperation.id,
teamId: fileOperation.teamId,
actorId: fileOperation.userId,
});
}

Expand Down

0 comments on commit d4e9f87

Please sign in to comment.