webcompat / webcompat-metrics-server

Server in charge of delivering different data to the webcompat-metrics-client
Mozilla Public License 2.0
6 stars 5 forks source link

Add a Scheduler to the project #64

Closed karlcow closed 5 years ago

karlcow commented 6 years ago

We need to add a scheduler to populate the data into the DB which is already there. In #20 we had code. We will recreate a scheduler.

This issue is not about saving needsdiagnosis data into the DB, but just having the scheduler ready and see how it goes.

karlcow commented 6 years ago

@laghee do you need a scheduler for a less regular task?

I'm asking because https://devcenter.heroku.com/articles/scheduler#scheduling-jobs is pretty basic but would answer the need for a hourly script (needsdiagnosis)

While APScheduler offers more flexibility https://devcenter.heroku.com/articles/clock-processes-python

karlcow commented 6 years ago

The difference too is that the simple addon from Heroku is just that. :) Aka no need to code the scheduler. Just add scripts in their UI.

karlcow commented 5 years ago

Just added the Heroku Scheduler to webcompat-metrics

karlcow commented 5 years ago

in https://devcenter.heroku.com/articles/scheduler

For apps built on other frameworks or languages, another convention is to add a script to bin/ that will perform the task. An example bin/clean-sessions script:

karlcow commented 5 years ago

The PR #77 will help to advance our goals for https://github.com/mozilla/webcompat-team-okrs/issues/48

karlcow commented 5 years ago

Once the PR #77 has been validated by @laghee I will add the task to the scheduler and we can start discover if our proof of concept is working.

Next step will be #67

laghee commented 5 years ago

I went ahead and merged PR #77 -- on our way to super-cool automated data flow!

karlcow commented 5 years ago

This is working manually at least.

capture d ecran 2019-01-30 a 11 57 01
karlcow commented 5 years ago

ok this definitely seems to be working.

capture d ecran 2019-01-30 a 13 04 29
karlcow commented 5 years ago

next step is #67