CodeForAfrica / sensors.AFRICA-api

The sensors.AFRICA API receiving, storing, and processing data received from sensors across the continentent. Accessible at https://api.sensors.africa/
https://api.sensors.africa/
18 stars 7 forks source link

[WON'T DO] Add cronjobs to crontab #22

Closed karimkawambwa closed 5 years ago

karimkawambwa commented 5 years ago

Description

Automatically installs or reinstalls cronjobs to crontab.

Type of change

Checklist:

karimkawambwa commented 5 years ago

@kilemensi see tests 📝

karimkawambwa commented 5 years ago

Using cronitor for this deployment #24

kilemensi commented 5 years ago

Shouldn't this be closed as won't do for now @karimkawambwa?

karimkawambwa commented 5 years ago

Clemence: Running cron from within a docker container proves to be problematic. You need to run cron as foreground process, otherwise docker will background and eventually stop it. While there a many suggestions, I haven't come across any that puts me at easy... Hence we'll schedule cron from the EC2 instance i.e. outside docker container. We'll also include a monitoring solution to make sure we're not caught off-guard by a failing cron job.

We'll investigate other docker container centric solutions like celery tasks in the next sprint(s).