Fix task id generation

This commit is contained in:
2020-04-19 21:21:16 +03:00
parent 61c41e6b03
commit 17de7e52dc
3 changed files with 1 additions and 23 deletions

View File

@ -1,21 +0,0 @@
import { ActionController, registerAction } from './ActionController';
import { Args } from '../Command';
import { Task } from '../Queue/TaskQueue';
import { ActionError } from '../Errors';
import { getNumber } from '../utils';
@registerAction
export class GrabHeroAttributesAction extends ActionController {
async run(args: Args, task: Task): Promise<any> {
const healthElement = jQuery('#attributes .attribute.health .powervalue .value');
if (healthElement.length !== 1) {
throw new ActionError(task.id, 'Health dom element not found');
}
const text = healthElement.text();
let normalized = text.replace(/[^0-9]/g, '');
const value = getNumber(normalized);
// this.state.set('hero', { health: value });
}
}