Commit 364fd104 authored by nanahira's avatar nanahira

Merge branch 'master' into develop

parents 61edb8d2 4c6a0635
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.retry = retry;
async function retry(fn, count, delayFn = (attempt) => Math.pow(2, attempt) * 1000) {
async function retry(fn, count, delayFn = (attempt) => Math.pow(2, attempt) * 100) {
let lastError;
for (let attempt = 0; attempt < count; attempt++) {
try {
......
export async function retry<T>(
fn: () => Promise<T>,
count: number,
delayFn: (attempt: number) => number = (attempt) => Math.pow(2, attempt) * 1000
delayFn: (attempt: number) => number = (attempt) => Math.pow(2, attempt) * 100
): Promise<T> {
let lastError: any;
......
......@@ -1538,7 +1538,7 @@ class Room
headers:
'Content-Type': 'application/x-www-form-urlencoded'
utility.retry post_match_scores, 10
utility.retry post_score_process, 10
.then (response) =>
log.info 'SCORE POST OK', response.status, response.statusText, @name, response.data
......
......@@ -2014,7 +2014,7 @@
}
});
};
utility.retry(post_match_scores, 10).then((response) => {
utility.retry(post_score_process, 10).then((response) => {
return log.info('SCORE POST OK', response.status, response.statusText, this.name, response.data);
}).catch((error) => {
if (error.response != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment