MOHOAzure / FB-auto-reporter

A fb page bot automatically collects news and makes reports
2 stars 0 forks source link

Save heroku dyno quota #13

Open MOHOAzure opened 3 years ago

MOHOAzure commented 3 years ago

For now, a free worker dyno is used by this app, and it cannot provide service through out a month once the free quota is consumed.

[Ref] https://devcenter.heroku.com/articles/free-dyno-hours#dyno-sleeping A heroku worker would sleep if the dyno receives no web traffic in a 30-minute period. Apps that only utilise a free worker dyno do not sleep, because they do not respond to web requests. Free web dynos do not consume free dyno hours while sleeping.

Possible solution: heroku clock https://devcenter.heroku.com/articles/clock-processes-python

MOHOAzure commented 3 years ago

The following picture is the dyno usage recorded at 2020-12-02 15:30:00 UTC+0.

image

The heroku clock is activated at 2020-12-02 15:32:25 UTC+0. Let's check dyno usage later! image

MOHOAzure commented 3 years ago

The clock solution seems work. image

Then the app is updated and restart. image

MOHOAzure commented 3 years ago

Weird! The following picture is the dyno usage recorded at 2020-12-03 09:40:00 UTC+0.

The usage climb to 47 hours from 20 hours.

image