add stats, versioning
This commit is contained in:
1 parent
dfd2c2f07d
commit
bcf625d2b0
6 files changed
+33
-6
No files matched your search
+16
-4
@@ -1,8 +1,18 @@
|
||||
import multiprocessing
|
||||
import os
|
||||
import git
|
||||
import src.banner as banner
|
||||
|
||||
|
||||
def get_git_commit():
|
||||
"""Get first 6 characters of current git commit hash"""
|
||||
try:
|
||||
repo = git.Repo(search_parent_directories=True)
|
||||
return repo.head.commit.hexsha[:6]
|
||||
except Exception:
|
||||
return "unknown"
|
||||
|
||||
|
||||
# Server socket
|
||||
bind = "127.0.0.1:7433" # nginx will proxy to this
|
||||
backlog = 2048
|
||||
@@ -71,11 +81,13 @@ def on_reload(server):
|
||||
|
||||
|
||||
def when_ready(server):
|
||||
print(banner.generate("studspider v0.1"))
|
||||
commit_hash = get_git_commit()
|
||||
print(f"{banner.generate("studspider v0.3.0")} - {commit_hash}")
|
||||
print("Built for PLAY-WELL TEKNOLOGIES by contact@studspider.sh\n\n")
|
||||
print(f"STUDSPIDER HOOK v0.1 RUNNING ON {bind}")
|
||||
print(f"WORKERS: {workers}")
|
||||
print(f"WORKING CLASS: {worker_class}\n")
|
||||
print(f"BOOTING ON:\t{bind}")
|
||||
print(f"WORKERS:\t{workers}")
|
||||
print(f"WORKER TYPE:\t{worker_class}")
|
||||
print(f"{'=' * 60}\n")
|
||||
|
||||
|
||||
def worker_int(worker):
|
||||
|
||||
Reference in new issue
Block a user