Compare commits

...
6 Commits
Author SHA1 Message Date
brb 448f757bd1 added copying of JDK 17 into image
pipeline / Test (push) Successful in 33s
Docker / Test (push) Successful in 30s
Docker / Publish (push) Successful in 27s
2023-07-24 16:24:01 +02:00
brb 89d29492e6 removed non utf8 character
pipeline / Test (push) Successful in 32s
2023-07-24 11:56:47 +02:00
brb fa191a02d3 installed packages
pipeline / Test (push) Successful in 32s
Docker / Test (push) Successful in 31s
Docker / Publish (push) Successful in 8s
2023-07-24 10:27:54 +02:00
brb 143c885eb8 changed default values
pipeline / Test (push) Successful in 31s
Docker / Test (push) Successful in 31s
Docker / Publish (push) Successful in 13s
2023-07-24 10:22:51 +02:00
brb 193292b254 added env var loading of user_id 2023-07-24 10:13:49 +02:00
brb 706ce7be9b removed unused variables 2023-07-24 10:11:06 +02:00
5 changed files with 21 additions and 16 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: pipeline
run-name: ${{ gitea.actor }} is running script
run-name: ${{ gitea.actor }} is running script
runs-on: ubuntu-latest
on:
push:
+5
View File
@@ -5,6 +5,11 @@
# pull official base image
FROM python:3.10-bookworm as BUILDER
# install JDK 17
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:17-jre $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"
# install Ookla's speedtest
RUN apt update && \
apt install -y speedtest-cli
+1 -2
View File
@@ -2,7 +2,6 @@
logger_level=debug
user_id=0
replicates=3
queue_flush_interval_seconds=600
[database]
db_ip_address=192.168.1.2
@@ -15,5 +14,5 @@ service_name=bandwidth_probing
logger_level=warning
[cron]
schedule=* * * * *
schedule=05 * * * *
tz=Europe/Paris
+2 -13
View File
@@ -14,13 +14,8 @@ from database import connect
# load default values
config = ConfigParser()
config.read(Path(__file__).parent / 'defaults.ini')
USER_ID = int(config.get('main', 'user_id'))
REPLICATES = int(config.get('main', 'replicates'))
QUEUE_FLUSH_INTERVAL_SECONDS = float(
config.get(
'main',
'queue_flush_interval_seconds'
)
)
SCHEDULE = config.get('cron', 'schedule')
TZ = config.get('cron', 'tz')
@@ -93,14 +88,8 @@ if __name__ == '__main__':
# setup
initialise_app()
data_queue: Queue = Queue()
user_id = int(os.getenv('USER_ID', default=0))
user_id = int(os.getenv('USER_ID', default=USER_ID))
replicates = int(os.getenv('REPLICATES', default=REPLICATES))
queue_flush_interval = float(
os.getenv(
'QUEUE_FLUSH_INTERVAL_SECONDS',
default=QUEUE_FLUSH_INTERVAL_SECONDS
)
)
schedule = os.getenv(
key='SCHEDULE',
default=SCHEDULE
+12
View File
@@ -3,15 +3,27 @@ async-timeout==4.0.2
attrs==23.1.0
certifi==2023.5.7
charset-normalizer==3.2.0
cron-converter==1.0.2
discord-webhook==1.1.0
dnspython==2.3.0
flake8==6.0.0
frozenlist==1.3.3
idna==3.4
mccabe==0.7.0
multidict==6.0.4
mypy==1.4.1
mypy-extensions==1.0.0
pycodestyle==2.10.0
pyflakes==3.0.1
pymongo==4.4.0
python-dateutil==2.8.2
python-dotenv==1.0.0
python-logging-discord-handler==0.1.4
requests==2.31.0
six==1.16.0
speedtest-cli==2.1.3
tomli==2.0.1
types-python-dateutil==2.8.19.14
typing_extensions==4.7.1
urllib3==2.0.3
yarl==1.9.2