Private
Public Access
1
0

added auto export for all platforms

This commit is contained in:
Sander Roosendaal
2018-06-06 10:36:30 +02:00
parent a277f71af3
commit 63d52eb42a
8 changed files with 179 additions and 28 deletions

View File

@@ -20,6 +20,7 @@ from rowingdata import rowingdata as rrdata
import rowers.uploads as uploads
from rowers.mailprocessing import make_new_workout_from_email, send_confirm
import rowers.polarstuff as polarstuff
workoutmailbox = Mailbox.objects.get(name='workouts')
failedmailbox = Mailbox.objects.get(name='Failed')
@@ -147,6 +148,9 @@ class Command(BaseCommand):
"""Run the Email processing command """
def handle(self, *args, **options):
polar_available = polarstuff.get_polar_notifications()
res = polarstuff.get_all_new_workouts(polar_available)
messages = Message.objects.filter(mailbox_id = workoutmailbox.id)
message_ids = [m.id for m in messages]
attachments = MessageAttachment.objects.filter(