public static function run_transaction(Transaction $transaction) {
		ob_start();
		echo date('[r] ') . 'Running ' . $transaction->classname . ' - ' . $transaction->id . "\n";

		$failed = false;
		try {
			$transaction->run();
		} catch (\Throwable $e) {
			$failed = true;
		} catch (\Exception $e) {
			$failed = true;
		}
		echo "\n";
		echo date('[r] ') . 'Finished ' . $transaction->classname . ' - ' . $transaction->id . "\n";

		$content = ob_get_contents();
		ob_get_clean();

		if ($failed) {
			$transaction->mark_failed($content, $e);
		} else {
			$transaction->mark_completed($content);
		}
	}
public static function run_transaction(Transaction $transaction) {
		ob_start();
		echo date('[r] ') . 'Running ' . $transaction->classname . ' - ' . $transaction->id . "\n";

		$failed = false;
		try {
			$transaction->run();
		} catch (\Throwable $e) {
			$failed = true;
		} catch (\Exception $e) {
			$failed = true;
		}
		echo "\n";
		echo date('[r] ') . 'Finished ' . $transaction->classname . ' - ' . $transaction->id . "\n";

		$content = ob_get_contents();
		ob_get_clean();

		if ($failed) {
			$transaction->mark_failed($content, $e);
		} else {
			$transaction->mark_completed($content);
		}
	}
public static function run_transaction ( Transaction $ transaction ) { ob_start ( ) ; echo date ( '[r] ' ) . 'Running ' . $ transaction -> classname . ' - ' . $ transaction -> id . "\n" ; $ failed = false ; try { $ transaction -> run ( ) ; } catch ( \ Throwable $ e ) { $ failed = true ; } catch ( \ Exception $ e ) { $ failed = true ; } echo "\n" ; echo date ( '[r] ' ) . 'Finished ' . $ transaction -> classname . ' - ' . $ transaction -> id . "\n" ; $ content = ob_get_contents ( ) ; ob_get_clean ( ) ; if ( $ failed ) { $ transaction -> mark_failed ( $ content , $ e ) ; } else { $ transaction -> mark_completed ( $ content ) ; } }
Run transaction, acquire one if none set

@access private
@param Transaction
Run transaction acquire one if none set