Commit 6209e846 authored by Paul Rich's avatar Paul Rich

additional adjustments for reporting systems.

parent b11287a1
......@@ -346,7 +346,7 @@ class Reservation (Data):
etime, int(self.start), int(self.start) + int(self.duration), self.name, self.queue,
self.resource_list, self.active_id, self.duration, self.partitions, self.users, self.project))
dbwriter.log_to_db(None, "deactivating", "reservation", self, etime)
dbwriter.log_to_db(None, "instance_end","reservation", self)
dbwriter.log_to_db(None, "instance_end", "reservation", self)
self.__cycle_reservation(True)
else:
logger.info("Res %s/%s: Active reservation %s deactivating: start time in future.",
......@@ -355,6 +355,7 @@ class Reservation (Data):
etime, int(self.start), int(self.start) + int(self.duration), self.name, self.queue,
self.resource_list, self.active_id, self.duration, self.partitions, self.users, self.project))
dbwriter.log_to_db(None, "deactivating", "reservation", self, etime)
self.active_id = self.active_id_gen.get()
return False
if self.cycle:
......
......@@ -234,11 +234,11 @@ def finish(reservation_id, requester, ctime, stime, etime, start_time, end_time,
"""
#Note: for charging purposes, this is closest to the 'E' record. This
#indicates the job data that should actually be charged.
msg = {'requester':requester, 'ctime':int(ctime), 'stime':int(stime), 'etime':int(etime),
msg = {'requester':requester, 'ctime':ctime, 'stime': stime, 'etime': etime,
'Resource_List':resource_list, 'active_id': active_id,
'resource':resource, 'duration': duration, 'exec_host':exec_host,
'authorized_users': authorized_users, 'users':authorized_users,
'start_time': start_time, 'end_time': end_time, 'queue': queue}
'start': start_time, 'end': end_time, 'queue': queue}
if name is not None:
msg['name'] = name
if account is not None:
......@@ -275,11 +275,11 @@ def system_remove (reservation_id, requester, ctime, stime, etime, start_time, e
"""
#Note: for charging purposes, this is closest to the 'E' record. This
#indicates the job data that should actually be charged.
msg = {'requester':requester, 'ctime':int(ctime), 'stime':int(stime), 'etime':int(etime),
msg = {'requester':requester, 'ctime':ctime, 'stime':stime, 'etime': etime,
'Resource_List':resource_list, 'active_id': active_id,
'resource':resource, 'duration': duration, 'exec_host':exec_host,
'authorized_users': authorized_users, 'users':authorized_users,
'start_time': start_time, 'end_time': end_time, 'queue': queue}
'start': start_time, 'end': end_time, 'queue': queue}
if name is not None:
msg['name'] = name
if account is not None:
......@@ -314,11 +314,11 @@ def remove (reservation_id, requester, ctime, stime, etime, start_time, end_time
"""
#Note: for charging purposes, this is closest to the 'E' record. This
#indicates the job data that should actually be charged.
msg = {'requester':requester, 'ctime':int(ctime), 'stime':int(stime), 'etime':int(etime),
msg = {'requester':requester, 'ctime':ctime, 'stime':stime, 'etime':etime,
'Resource_List':resource_list, 'active_id': active_id,
'resource':resource, 'duration': duration, 'exec_host':exec_host,
'authorized_users': authorized_users, 'users':authorized_users,
'start_time': start_time, 'end_time': end_time, 'queue': queue}
'start': start_time, 'end': end_time, 'queue': queue}
if name is not None:
msg['name'] = name
if account is not None:
......
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 to comment