TACCProjects / tacc_stats

GNU Lesser General Public License v2.1
7 stars 12 forks source link

Migrate to directory of pickled obj #21

Open aterrel opened 12 years ago

aterrel commented 12 years ago

Convert all the shelve scripts over to the new dir of pickled objects.

Jlong591 commented 12 years ago

trouble with database: when updating with pickled jobs, run into 'mem_LowTotal' is an invalid keyword argument for this function when running the following code (line 155 in the script I just pushed to my git)

job_dict = { 'system': system, 'acct_id': a_job.id, 'owner': owner, 'queue': a_job.acct['queue'], 'queue_wait_time': a_job.start_time - a_job.acct['submission_time'], 'begin': a_job.start_time, 'end': a_job.end_time,

'nr_bad_hots': nr_bad_hosts,

'nr_slots': a_job.acct['slots'], 'pe': a_job.acct['granted_pe'], 'failed': a_job.acct['failed'], 'exit_status': a_job.acct['exit_status'], } job_dict.update(job.JobAggregator(a_job).stats)

newJob.nr_hosts = len(a_job.hosts)

try: newJob = tsm_Job(**job_dict) newJob.save() except DatabaseError,TypeError: print "Error on job,", a_job.id transaction.rollback()

(note, got this from your build_database.py).

Could it be an issue with what job objects I pickled and the stats in them? I just don't know where to start looking so some direction on this would be greatly appreciated!