blob: 8a258f1f631e1be2cc31ab6072e07b1f916f5e5a [file] [log] [blame]
Sapan Bhatia511ea5f2014-07-21 22:53:58 -04001import os
2import base64
3from django.db.models import F, Q
4from planetstack.config import Config
5from ec2_observer.syncstep import SyncStep
6from core.models.site import *
7
8class SyncDeployments(SyncStep):
9 requested_interval=86400
10 provides=[Deployment]
11
12 def fetch_pending(self,deletion):
13 deployments = Deployment.objects.filter(Q(name="Amazon EC2"))
14 if (not deployments):
15 deployments = [Deployment(name="Amazon EC2")]
16 else:
17 deployments = []
18
19 return deployments
20
21 def sync_record(self, deployment):
22 deployment.save()