Commit 916a94a7 authored by Pelayo Torres's avatar Pelayo Torres
Browse files

added event requirement to events service

parent 1a835c3a
Loading
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
# celery_app/Dockerfile

FROM python:3.9

WORKDIR /celery_app

COPY requirements.txt /celery_app/
RUN pip install --no-cache-dir -r requirements.txt

COPY . /celery_app

RUN chmod +x /celery_app/start_celery.sh

CMD ["/celery_app/start_celery.sh"]
+0 −0

Empty file added.

+20 −0
Original line number Original line Diff line number Diff line
import os

import yaml


#Config class to get config
class Config:
	def __init__(self):
		self.cached = 0
		self.file="./config.yaml"
		self.my_config = {}
		stamp = os.stat(self.file).st_mtime
		if stamp != self.cached:
			self.cached = stamp
			f = open(self.file)
			self.my_config = yaml.safe_load(f)
			f.close()

	def get_config(self):
		return self.my_config
+8 −0
Original line number Original line Diff line number Diff line
mongo: {
  'user': 'root',
  'password': 'example',
  'db': 'capif',
  'notifications_col': 'notifications',
  'host': 'mongo',
  'port': "27017"
}
+7 −0
Original line number Original line Diff line number Diff line
celery==5.4
pymongo==4.2.0
redis==4.5.4
aiohttp == 3.10.5
async-timeout == 4.0.3
pyyaml == 6.0.2
python_dateutil >= 2.6.0
Loading