Moved staticmethods from TaskStatus model to agent services since that is the only place where they are being used