Actual fix this time
This commit is contained in:
1 parent
88ce2145f4
commit
faf1f872fe
2 files changed
+6
-4
No files matched your search
+6
-1
@@ -84,7 +84,11 @@ def getMachine(machineid, username, osname, threads):
|
|||||||
|
|
||||||
# Client has no saved machine ID, make a new machine
|
# Client has no saved machine ID, make a new machine
|
||||||
if machineid == 'None':
|
if machineid == 'None':
|
||||||
return Machine.objects.create(owner=username, osname=osname, threads=int(threads))
|
machine = Machine()
|
||||||
|
machine.username = username
|
||||||
|
machine.osname = osname
|
||||||
|
machine.threads = int(threads)
|
||||||
|
return machine
|
||||||
|
|
||||||
# Fetch and verify the claimed machine ID
|
# Fetch and verify the claimed machine ID
|
||||||
machine = Machine.objects.get(id=machineid)
|
machine = Machine.objects.get(id=machineid)
|
||||||
@@ -94,6 +98,7 @@ def getMachine(machineid, username, osname, threads):
|
|||||||
# Update to reflect new worload
|
# Update to reflect new worload
|
||||||
machine.threads = int(threads)
|
machine.threads = int(threads)
|
||||||
machine.mnps = 0.00
|
machine.mnps = 0.00
|
||||||
|
machine.save()
|
||||||
return machine
|
return machine
|
||||||
|
|
||||||
def getWorkload(machine):
|
def getWorkload(machine):
|
||||||
|
|||||||
@@ -374,9 +374,6 @@ def getWorkload(request):
|
|||||||
try: result = OpenBench.utils.getResult(machine, test)
|
try: result = OpenBench.utils.getResult(machine, test)
|
||||||
except: return HttpResponse('None')
|
except: return HttpResponse('None')
|
||||||
|
|
||||||
# Got everything
|
|
||||||
machine.save();
|
|
||||||
|
|
||||||
# Send ID's and test information as a string dictionary
|
# Send ID's and test information as a string dictionary
|
||||||
return HttpResponse(str(OpenBench.utils.workloadDictionary(machine, result, test)))
|
return HttpResponse(str(OpenBench.utils.workloadDictionary(machine, result, test)))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user