Compare commits

...

7 Commits

Author SHA1 Message Date
c776971267 update dockerhub
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-31 22:55:55 +01:00
71ffd8707d update python
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-31 22:26:01 +01:00
7e1c67e394 add dockerhub step 2022-01-31 22:09:30 +01:00
eecb65894d Fixed routing keys
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-18 15:56:24 +02:00
17bf93f8fd fixed sentry dsn
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-18 14:43:38 +02:00
1ddc40a8cc Merge branch 'master' of ssh://git.kmlabz.com:2222/birbnetes/input-service
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-18 14:05:50 +02:00
2c1113baab Merge pull request 'norbi-update' (#1) from norbi-update into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1
2021-08-18 13:47:03 +02:00
4 changed files with 18 additions and 6 deletions

View File

@ -24,6 +24,18 @@ steps:
- latest
- ${DRONE_BUILD_NUMBER}
- name: dockerhub
image: plugins/docker
settings:
repo: birbnetes/${DRONE_REPO_NAME}
username:
from_secret: DOCKERHUB_USER
password:
from_secret: DOCKERHUB_PASSWORD
tags:
- latest
- ${DRONE_BUILD_NUMBER}
- name: ms-teams
image: kuperiu/drone-teams
settings:

View File

@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.10-slim
ENV TZ Europe/Budapest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@ -6,7 +6,7 @@ metadata:
app: input-service
namespace: birbnetes
data:
SENTRY_DSN: https://fce9e078e1494bf4b959b45d0b435386@sentry.kmlabz.com/2
SENTRY_DSN: https://f2fa88f1a13a42d3993d96024ce31b48@glitchtip.kmlabz.com/3
RELEASE_ID: kmlabz-k8s
INPUT_SERVICE_RELEASEMODE: release
INPUT_RABBITMQ_HOSTNAME: birb-rabbitmq

View File

@ -75,7 +75,7 @@ class MagicAMQP:
if total_time > 1:
self.app.logger.warning(f"Loop: Total loop took {total_time:5f} sec")
def _publish(self, exchange: str, payload=None):
def _publish(self, exchange: str, routing_key: str, payload=None):
"""
Publish a simple json serialized message to the configured queue.
If the connection is broken, then this call will block until the connection is restored
@ -94,7 +94,7 @@ class MagicAMQP:
try:
self._pika_channel.basic_publish(
exchange=exchange,
routing_key='feature',
routing_key=routing_key,
body=json.dumps(payload).encode('UTF-8')
)
self.app.logger.debug(f"Published: {payload}")
@ -125,10 +125,10 @@ class MagicAMQP:
self.app.logger.warning(f"Publish: Total publish took {total_time:5f} sec")
def publish_cache(self, payload=None):
return self._publish(self.app.config['EXCHANGE_NAME_CACHE'], payload)
return self._publish(self.app.config['EXCHANGE_NAME_CACHE'], "cache", payload)
def publish_meta(self, payload=None):
return self._publish(self.app.config['EXCHANGE_NAME_META'], payload)
return self._publish(self.app.config['EXCHANGE_NAME_META'], "meta", payload)
def is_healthy(self) -> bool:
with self._lock: