Commit 857bdc34 by Őry Máté

vm: add missing system=True to garbage_collector

parent c7b205a4
...@@ -27,7 +27,7 @@ def garbage_collector(timeout=15): ...@@ -27,7 +27,7 @@ def garbage_collector(timeout=15):
now = timezone.now() now = timezone.now()
for i in Instance.objects.filter(destroyed_at=None).all(): for i in Instance.objects.filter(destroyed_at=None).all():
if i.time_of_delete and now > i.time_of_delete: if i.time_of_delete and now > i.time_of_delete:
i.destroy.async() i.destroy.async(system=True)
logger.info("Expired instance %d destroyed.", i.pk) logger.info("Expired instance %d destroyed.", i.pk)
try: try:
i.owner.profile.notify( i.owner.profile.notify(
...@@ -39,7 +39,7 @@ def garbage_collector(timeout=15): ...@@ -39,7 +39,7 @@ def garbage_collector(timeout=15):
i.pk, unicode(e)) i.pk, unicode(e))
elif (i.time_of_suspend and now > i.time_of_suspend and elif (i.time_of_suspend and now > i.time_of_suspend and
i.state == 'RUNNING'): i.state == 'RUNNING'):
i.sleep.async() i.sleep.async(system=True)
logger.info("Expired instance %d suspended." % i.pk) logger.info("Expired instance %d suspended." % i.pk)
try: try:
i.owner.profile.notify( i.owner.profile.notify(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment