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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user