Small fixes

This commit is contained in:
Anton Vakhrushev 2020-05-06 10:12:55 +03:00
parent 789c5aba3e
commit 9087a79c5b
3 changed files with 4 additions and 6 deletions

View File

@ -23,11 +23,7 @@ export class TaskQueueRenderer {
'padding': '8px 6px', 'padding': '8px 6px',
}); });
tasks.forEach(task => { tasks.forEach(task => {
ul.append( ul.append(jQuery('<li></li>').text(formatDate(task.ts) + ' ' + task.name + ' ' + task.id));
jQuery('<li></li>').text(
formatDate(task.ts) + ' ' + task.name + ' ' + JSON.stringify(task.args) + ' ' + task.id
)
);
}); });
const el = jQuery(`#${ID}`); const el = jQuery(`#${ID}`);

View File

@ -26,5 +26,6 @@ function main() {
try { try {
main(); main();
} catch (e) { } catch (e) {
console.error('Main func error', e);
setTimeout(() => location.reload(), 5000); setTimeout(() => location.reload(), 5000);
} }

View File

@ -11,7 +11,8 @@ function randomInRange(from: number, to: number): number {
} }
export async function sleepMicro() { export async function sleepMicro() {
return await sleep(randomInRange(1500, 2500)); const timeInMs = randomInRange(1500, 2500);
return await sleep(timeInMs);
} }
export function aroundMinutes(minutes: number) { export function aroundMinutes(minutes: number) {