Skip to content

Commit

Permalink
last lamda
Browse files Browse the repository at this point in the history
  • Loading branch information
fsignorini committed Oct 11, 2018
1 parent 3556190 commit e99d4b3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/tasks/last.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ def entity_count(dc_id, region, lst):
query = json.dumps({
'datacenters._id': dc_id,
'datacenters.region': region,
'active': True,
'_id': {'$nin': lst}
'active': True
})

body = ({
'active': False
})
body = json.dumps({'active': False})
nin = json.dumps(lst)

return ExternalMaestroData() \
.post_request(path="sync", body={'query': query, 'body': body}) \
.post_request(path="sync", body={'query': query, 'body': body, 'nin': nin}) \
.get_results()

@celery.task(name="last.api")
Expand Down

0 comments on commit e99d4b3

Please sign in to comment.