[s2s] save hostname with repo info (#7301)

* save hostname
This commit is contained in:
Sam Shleifer
2020-09-21 17:26:24 -04:00
committed by GitHub
parent 34a1b75f01
commit 656c27c3a3

View File

@@ -4,6 +4,7 @@ import linecache
import math import math
import os import os
import pickle import pickle
import socket
from logging import getLogger from logging import getLogger
from pathlib import Path from pathlib import Path
from typing import Callable, Dict, Iterable, List, Union from typing import Callable, Dict, Iterable, List, Union
@@ -372,6 +373,7 @@ def get_git_info():
"repo_id": str(repo), "repo_id": str(repo),
"repo_sha": str(repo.head.object.hexsha), "repo_sha": str(repo.head.object.hexsha),
"repo_branch": str(repo.active_branch), "repo_branch": str(repo.active_branch),
"hostname": str(socket.gethostname()),
} }
return repo_infos return repo_infos