mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-09-01 12:26:08 +08:00
chore: remove transaction
This commit is contained in:
parent
448d4508aa
commit
6dd493b735
1 changed files with 5 additions and 7 deletions
|
@ -18,12 +18,10 @@ export default class UserDeviceJob extends Job {
|
|||
const attempts = job.options.attempts ?? 1
|
||||
const attemptsMade = job.state.attemptsMade ?? 0
|
||||
|
||||
await App.main.db.transaction(async (trx) => {
|
||||
try {
|
||||
await saveDevice(project_id, device, trx)
|
||||
} catch (error) {
|
||||
if (attemptsMade < (attempts - 1)) throw error
|
||||
}
|
||||
})
|
||||
try {
|
||||
await saveDevice(project_id, device)
|
||||
} catch (error) {
|
||||
if (attemptsMade < (attempts - 1)) throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue