change from 'event' to 'event_type'
This commit is contained in:
parent
c891312917
commit
4de2aaa074
@ -14,7 +14,7 @@ class Callback(object):
|
||||
def on_event(self, deployment, routing_key, body, exchange):
|
||||
print "Got:", body
|
||||
self.x += 1
|
||||
if self.x > 10:
|
||||
if self.x > 100000:
|
||||
sys.exit(1)
|
||||
|
||||
def shutting_down(self):
|
||||
|
@ -32,6 +32,6 @@ while nevents < 10000:
|
||||
nevents += len(e)
|
||||
for event in e:
|
||||
driver.send_notification(event, queue_name, connection, exchange)
|
||||
print nevents, event['when'], event['event']
|
||||
print nevents, event['when'], event['event_type']
|
||||
|
||||
now = datetime.datetime.utcnow()
|
||||
|
@ -163,7 +163,7 @@ class EventGenerator(object):
|
||||
self.instances_in_use.add(uuid)
|
||||
elif event['is_delete']:
|
||||
self.instances_in_use.remove(uuid)
|
||||
#print "%s %40s U:%4s" % (' ' * 20, event['event'], uuid[-4:])
|
||||
#print "%s %40s U:%4s" % (' ' * 20, event['event_type'], uuid[-4:])
|
||||
ready.append(event)
|
||||
|
||||
def _get_action(self, now):
|
||||
@ -273,13 +273,13 @@ class EventGenerator(object):
|
||||
if event[-1] == '*':
|
||||
event = event[0:-1]
|
||||
extra = {'when': now, 'node': node}
|
||||
results.append(self._pkg(base, extra, {'event': event + "start"}))
|
||||
results.append(self._pkg(base, extra, {'event_type': event + "start"}))
|
||||
now = self._bump_time(now, 0.25, 60.0 * 15.0) # In compute node
|
||||
extra = {'when': now, 'node': node}
|
||||
results.append(self._pkg(base, extra, {'event': event + "end"}))
|
||||
results.append(self._pkg(base, extra, {'event_type': event + "end"}))
|
||||
else:
|
||||
extra = {'when': now, 'node': node}
|
||||
results.append(self._pkg(base, extra, {'event': event}))
|
||||
results.append(self._pkg(base, extra, {'event_type': event}))
|
||||
return results
|
||||
|
||||
def _pkg(self, *args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user