Skip to content

Commit

Permalink
fix(api): fix groupNotify
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Oct 5, 2024
1 parent d09ac0e commit e5d4a3f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/engine-chronocat-api/src/services/groupNotify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { debounce } from 'lodash-es'
import { throttle } from 'lodash-es'
import { getSingleScreenNotifies } from '../definitions/groupService'

const refreshIntl2 = async () => {
Expand All @@ -14,8 +14,13 @@ const refreshIntl2 = async () => {
})
}

const refreshIntl1 = debounce(refreshIntl2, 2000, {
maxWait: 2000,
// const refreshIntl1 = debounce(refreshIntl2, 2000, {
// maxWait: 2000,
// })

const refreshIntl1 = throttle(refreshIntl2, 4000, {
leading: true,
trailing: false,
})

const refresh = () => setTimeout(refreshIntl1, 2000)
Expand Down

0 comments on commit e5d4a3f

Please sign in to comment.