mirror of
https://github.com/encounter/decomp.me.git
synced 2026-03-30 11:06:27 -07:00
906aa4a8a8
* Switch to subprocess.run for timeouts * [experiment] Set CI TIMEOUT_SCALE_FACTOR to 1 * supress parameterized.expand error in event of no compilers, change TIMEOUT_SCALE_FACTOR in CI to 2 * Exempt dummy compilers from nsjail bind mounts, disable nsjail time limits * Don't run timeout test on windows * Decouple test_compiler_timeout's timeout from global timeout settings, reset TIMEOUT_SCALE_FACTOR to 10 * Have DummyLongRunningCompiler subclass DummyCompiler * Have a timeout of zero disable timeouts entirely * Skip test_zero_timeout on windows * black Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
15 lines
315 B
Python
15 lines
315 B
Python
import hashlib
|
|
import logging
|
|
import time
|
|
|
|
from typing import Tuple
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
_startup_time = int(time.time())
|
|
logger.info("Startup time: %s", _startup_time)
|
|
|
|
|
|
def gen_hash(key: Tuple[str, ...]) -> str:
|
|
return hashlib.sha256(str(key + (_startup_time,)).encode("utf-8")).hexdigest()
|