Skip to content

Commit

Permalink
adjust final capacity depending on publishing lambda function or not
Browse files Browse the repository at this point in the history
  • Loading branch information
ijin committed Jan 26, 2016
1 parent 129c077 commit d0da605
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lamvery/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,19 @@ def action(self):
name='Function - Configuration',
remote=remote_conf, local=local_conf, keys=CONF_DIFF_KEYS)

self._print_capacity(
remote=client.calculate_capacity(),
local=archive.get_size())
remote=client.calculate_capacity()
local=archive.get_size()

if len(remote_conf) > 0:
if not self._publish:
local -= remote_conf['CodeSize']
self._print_capacity(remote=remote, local=local)
client.update_function_code(zipfile, local_conf, self._publish)
client.update_function_conf(local_conf)
else:
if self._publish:
local *= 2
self._print_capacity(remote=remote, local=local)
client.create_function(zipfile, local_conf, self._publish)
zipfile.close()
self._set_alias.action()
Expand Down

0 comments on commit d0da605

Please sign in to comment.