Compare commits
7 Commits
norbi-upda
...
master
Author | SHA1 | Date | |
---|---|---|---|
c776971267 | |||
71ffd8707d | |||
7e1c67e394 | |||
eecb65894d | |||
17bf93f8fd | |||
1ddc40a8cc | |||
2c1113baab |
12
.drone.yml
12
.drone.yml
@ -24,6 +24,18 @@ steps:
|
|||||||
- latest
|
- latest
|
||||||
- ${DRONE_BUILD_NUMBER}
|
- ${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
|
- name: ms-teams
|
||||||
image: kuperiu/drone-teams
|
image: kuperiu/drone-teams
|
||||||
settings:
|
settings:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.9-slim
|
FROM python:3.10-slim
|
||||||
|
|
||||||
ENV TZ Europe/Budapest
|
ENV TZ Europe/Budapest
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
@ -6,7 +6,7 @@ metadata:
|
|||||||
app: input-service
|
app: input-service
|
||||||
namespace: birbnetes
|
namespace: birbnetes
|
||||||
data:
|
data:
|
||||||
SENTRY_DSN: https://fce9e078e1494bf4b959b45d0b435386@sentry.kmlabz.com/2
|
SENTRY_DSN: https://f2fa88f1a13a42d3993d96024ce31b48@glitchtip.kmlabz.com/3
|
||||||
RELEASE_ID: kmlabz-k8s
|
RELEASE_ID: kmlabz-k8s
|
||||||
INPUT_SERVICE_RELEASEMODE: release
|
INPUT_SERVICE_RELEASEMODE: release
|
||||||
INPUT_RABBITMQ_HOSTNAME: birb-rabbitmq
|
INPUT_RABBITMQ_HOSTNAME: birb-rabbitmq
|
||||||
|
@ -75,7 +75,7 @@ class MagicAMQP:
|
|||||||
if total_time > 1:
|
if total_time > 1:
|
||||||
self.app.logger.warning(f"Loop: Total loop took {total_time:5f} sec")
|
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.
|
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
|
If the connection is broken, then this call will block until the connection is restored
|
||||||
@ -94,7 +94,7 @@ class MagicAMQP:
|
|||||||
try:
|
try:
|
||||||
self._pika_channel.basic_publish(
|
self._pika_channel.basic_publish(
|
||||||
exchange=exchange,
|
exchange=exchange,
|
||||||
routing_key='feature',
|
routing_key=routing_key,
|
||||||
body=json.dumps(payload).encode('UTF-8')
|
body=json.dumps(payload).encode('UTF-8')
|
||||||
)
|
)
|
||||||
self.app.logger.debug(f"Published: {payload}")
|
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")
|
self.app.logger.warning(f"Publish: Total publish took {total_time:5f} sec")
|
||||||
|
|
||||||
def publish_cache(self, payload=None):
|
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):
|
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:
|
def is_healthy(self) -> bool:
|
||||||
with self._lock:
|
with self._lock:
|
||||||
|
Loading…
Reference in New Issue
Block a user