Private
Public Access
1
0

Offline CP calculations for OTW

A new table in the database with precalculated CP values. The data
are updated through RQ/Celery asynchronous functions
This commit is contained in:
Sander Roosendaal
2017-10-25 15:17:14 +02:00
parent 470e809ebf
commit 74acd35e7a
6 changed files with 194 additions and 35 deletions

View File

@@ -641,7 +641,18 @@ attrs.update(strokedatafields)
StrokeData = type(str('StrokeData'), (models.Model,),
attrs
)
# Storing data for the OTW CP chart
class cpdata(models.Model):
delta = models.IntegerField(default=0)
cp = models.FloatField(default=0)
user = models.IntegerField(default=0)
class Meta:
db_table = 'cpdata'
index_together = ['user']
app_label = 'rowers'
# A wrapper around the png files
class GraphImage(models.Model):
filename = models.CharField(default='',max_length=150,blank=True,null=True)