moved ack to after save of raw
This commit is contained in:
parent
6af84ef178
commit
54a1f5fb0e
@ -364,9 +364,6 @@ def process_raw_data(deployment, args, json_args):
|
||||
values['json'] = json_args
|
||||
record = STACKDB.create_rawdata(**values)
|
||||
STACKDB.save(record)
|
||||
|
||||
aggregate_lifecycle(record)
|
||||
aggregate_usage(record, body)
|
||||
return record
|
||||
|
||||
|
||||
|
@ -87,11 +87,15 @@ class NovaConsumer(kombu.mixins.ConsumerMixin):
|
||||
args = (routing_key, json.loads(body))
|
||||
asJson = json.dumps(args)
|
||||
|
||||
# save raw and ack the message
|
||||
raw = views.process_raw_data(self.deployment, args, asJson)
|
||||
if raw:
|
||||
self.processed += 1
|
||||
message.ack()
|
||||
|
||||
views.aggregate_lifecycle(raw)
|
||||
views.aggregate_usage(raw, args[1])
|
||||
|
||||
self._check_memory()
|
||||
|
||||
def _check_memory(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user