mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-22 15:57:28 +02:00
only one worker at a time
This commit is contained in:
@@ -1526,6 +1526,9 @@ page_container %}
|
|||||||
|
|
||||||
invoiceCheckWorker: async function () {
|
invoiceCheckWorker: async function () {
|
||||||
let nInterval = 0
|
let nInterval = 0
|
||||||
|
if (this.invoiceCheckListener) {
|
||||||
|
clearInterval(this.invoiceCheckListener)
|
||||||
|
}
|
||||||
this.invoiceCheckListener = setInterval(async () => {
|
this.invoiceCheckListener = setInterval(async () => {
|
||||||
try {
|
try {
|
||||||
nInterval += 1
|
nInterval += 1
|
||||||
@@ -1978,6 +1981,9 @@ page_container %}
|
|||||||
|
|
||||||
checkTokenSpendableWorker: async function () {
|
checkTokenSpendableWorker: async function () {
|
||||||
let nInterval = 0
|
let nInterval = 0
|
||||||
|
if (this.tokensCheckSpendableListener) {
|
||||||
|
clearInterval(this.tokensCheckSpendableListener)
|
||||||
|
}
|
||||||
this.tokensCheckSpendableListener = setInterval(async () => {
|
this.tokensCheckSpendableListener = setInterval(async () => {
|
||||||
try {
|
try {
|
||||||
nInterval += 1
|
nInterval += 1
|
||||||
|
Reference in New Issue
Block a user