Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.2k forks source link

switching "keep_warm" off doesn't work #1915

Open filthysocks opened 5 years ago

filthysocks commented 5 years ago

If you switch the keep_warm functionality on and then back off again then the cloudwatch rule is NOT deleted.

Context

If you set keep_warm to true, deploy set it to false and deploy again then the cloudwatch rule is not deleted. Thus, the function will still be kept warm.

Expected Behavior

if keep_warm: false, then the function should not be kept warm

Actual Behavior

it is kept warm

Possible Fix

not sure ...

Steps to Reproduce

  1. deploy a function with "keep_warm": true
  2. update this function with "keep_warm": false

Your Environment

themmes commented 5 years ago

Have you tried undeploying and redeploying? Undeploy should definitely remove the keep_warm rule.

filthysocks commented 5 years ago

no i havent. I use an api key for authentication. If i reploy, i guess i need to setup a new one?

themmes commented 5 years ago

Not sure, just run zappa undeploy dev and zappa redeploy dev and see what it says

filthysocks commented 5 years ago

it deletes everything (which means i need to setup the new api key)

aralmpa commented 5 years ago

@filthysocks I think in order to properly unschedule the warm-up (and keep it that way) you need to

1) set keep_warm: false 2) run zappa unschedule your_env

It says so in the docs scheduling - if you look in the advance settings in docs it is also mentioned but I think there (at least if you are new with zappa) wording is not as clear that unschedule is a command.