Lecture 11: More Heroku & WSGI Features Flashcards

1
Q

What are clock dynos designed to do?

A

Schedule tasks at intervals, or at period times

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What files do we need to modify to set up a clock dyno?

A
  • Procfile
    clock: python scheduledjob.py
  • requirements.txt
    apscheduler
    tzlocal<3.0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does apscheduler do?

A

Allows us to call a function on a specified time interval using a blocking scheduling system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the steps in creating a basic clock application?

A
  1. Import the apscheduler and create an
    instance of a BlockingScheduler()
  2. Set the time interval to run the scheduled
    job, and define the job function
  3. Start the scheduler when script beings
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What command do you run to start your clock dyno?

A

heroku ps:scale clock=1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What command do you kill your clock dyno?

A

heroku ps:scale clock=0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly