public function perform(): bool
    {
        try {
            $instance = $this->getInstance();

            if (method_exists($instance, 'setUp')) {
                $instance->setUp();
            }

            $this->getEventsManager()->fire(new JobEvent\BeforePerform($this, $this));
            $performMethod = $this->getPerformMethod();
            $instance->$performMethod($this);
            $this->getEventsManager()->fire(new JobEvent\AfterPerform($this, $this));

            if (method_exists($instance, 'tearDown')) {
                $instance->tearDown();
            }
        } catch (\Throwable $e) {
            $this->fail(
                'system:fatal',
                sprintf('%s: %s in %s on line %d', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine())
            );

            return false;
        }

        return true;
    }