🛂 Reset isQuarantined on the first of month
This commit is contained in:
@@ -14,6 +14,7 @@ export const cleanDatabase = async () => {
|
||||
if (isFirstOfMonth) {
|
||||
await deleteArchivedResults()
|
||||
await deleteArchivedTypebots()
|
||||
await resetQuarantinedWorkspaces()
|
||||
}
|
||||
console.log('Done!')
|
||||
}
|
||||
@@ -118,4 +119,14 @@ const deleteExpiredVerificationTokens = async () => {
|
||||
console.log(`Deleted ${count} expired verifiations tokens.`)
|
||||
}
|
||||
|
||||
const resetQuarantinedWorkspaces = async () =>
|
||||
prisma.workspace.updateMany({
|
||||
where: {
|
||||
isQuarantined: true,
|
||||
},
|
||||
data: {
|
||||
isQuarantined: false,
|
||||
},
|
||||
})
|
||||
|
||||
cleanDatabase().then()
|
||||
|
||||
Reference in New Issue
Block a user