mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 06:53:18 +08:00
Added contributors file
This commit is contained in:
parent
b11bb26f51
commit
2c324a91b6
7
CONTRIBUTORS.md
Normal file
7
CONTRIBUTORS.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Ballistica Contributors
|
||||||
|
(please add your name and info here if you have contributed to the project)
|
||||||
|
|
||||||
|
### Eric Froemling
|
||||||
|
- Original author
|
||||||
|
- BDFL (benevolent dictator for life)
|
||||||
|
|
||||||
@ -31,6 +31,8 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
from multiprocessing import cpu_count
|
||||||
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import List, Dict, Tuple, Set
|
from typing import List, Dict, Tuple, Set
|
||||||
@ -250,10 +252,7 @@ def _write_cache_file(staging_dir: str, fname: str) -> Tuple[str, str]:
|
|||||||
|
|
||||||
def _write_cache_files(fnames1: List[str], fnames2: List[str],
|
def _write_cache_files(fnames1: List[str], fnames2: List[str],
|
||||||
staging_dir: str, mapping_file: str) -> None:
|
staging_dir: str, mapping_file: str) -> None:
|
||||||
# pylint: disable=too-many-locals
|
|
||||||
fhashes1: Set[str] = set()
|
fhashes1: Set[str] = set()
|
||||||
from multiprocessing import cpu_count
|
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
|
||||||
import functools
|
import functools
|
||||||
import json
|
import json
|
||||||
mapping: Dict[str, str] = {}
|
mapping: Dict[str, str] = {}
|
||||||
@ -271,7 +270,6 @@ def _write_cache_files(fnames1: List[str], fnames2: List[str],
|
|||||||
# on the server than it is to build it here and upload the whole thing.
|
# on the server than it is to build it here and upload the whole thing.
|
||||||
# ...so let's simply write a script to generate it and upload that.
|
# ...so let's simply write a script to generate it and upload that.
|
||||||
|
|
||||||
# yapf: disable
|
|
||||||
script = (
|
script = (
|
||||||
'import os\n'
|
'import os\n'
|
||||||
'import subprocess\n'
|
'import subprocess\n'
|
||||||
@ -289,7 +287,6 @@ def _write_cache_files(fnames1: List[str], fnames2: List[str],
|
|||||||
' check=True)\n'
|
' check=True)\n'
|
||||||
'subprocess.run(["rm", "-rf", "efrocache", "genstartercache.py"])\n'
|
'subprocess.run(["rm", "-rf", "efrocache", "genstartercache.py"])\n'
|
||||||
'print("Starter cache generation complete!", flush=True)\n')
|
'print("Starter cache generation complete!", flush=True)\n')
|
||||||
# yapf: enable
|
|
||||||
|
|
||||||
with open('build/efrocache/genstartercache.py', 'w') as outfile:
|
with open('build/efrocache/genstartercache.py', 'w') as outfile:
|
||||||
outfile.write(script)
|
outfile.write(script)
|
||||||
@ -320,8 +317,6 @@ def _check_warm_start_entry(entry: Tuple[str, str]) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def _check_warm_start_entries(entries: List[Tuple[str, str]]) -> None:
|
def _check_warm_start_entries(entries: List[Tuple[str, str]]) -> None:
|
||||||
from multiprocessing import cpu_count
|
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
|
||||||
with ThreadPoolExecutor(max_workers=cpu_count()) as executor:
|
with ThreadPoolExecutor(max_workers=cpu_count()) as executor:
|
||||||
# Converting this to a list pulls results and propagates errors)
|
# Converting this to a list pulls results and propagates errors)
|
||||||
list(executor.map(_check_warm_start_entry, entries))
|
list(executor.map(_check_warm_start_entry, entries))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user