going through the tests
This commit is contained in:
@@ -86,9 +86,8 @@ class Command(BaseCommand):
|
||||
rowers = Rower.objects.filter(c2_auto_import=True)
|
||||
for r in rowers: # pragma: no cover
|
||||
try:
|
||||
if user_is_not_basic(r.user) or user_is_coachee(r.user):
|
||||
c2integration = C2Integration(r.user)
|
||||
_ = c2integration.get_workouts()
|
||||
c2integration = C2Integration(r.user)
|
||||
_ = c2integration.get_workouts()
|
||||
except: # pragma: no cover
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
@@ -97,9 +96,8 @@ class Command(BaseCommand):
|
||||
rowers = Rower.objects.filter(rp3_auto_import=True)
|
||||
for r in rowers: # pragma: no cover
|
||||
try:
|
||||
if user_is_not_basic(r.user) or user_is_coachee(r.user):
|
||||
rp3_integration = RP3Integration(r.user)
|
||||
_ = rp3_integration.get_workouts()
|
||||
rp3_integration = RP3Integration(r.user)
|
||||
_ = rp3_integration.get_workouts()
|
||||
except: # pragma: no cover
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
@@ -108,25 +106,14 @@ class Command(BaseCommand):
|
||||
rowers = Rower.objects.filter(nk_auto_import=True)
|
||||
for r in rowers: # pragma: no cover
|
||||
try:
|
||||
if user_is_not_basic(r.user) or user_is_coachee(r.user):
|
||||
dologging("nklog.log","NK Auto import set for rower {id}".format(id=r.user.id))
|
||||
nk_integration = NKIntegration(r.user)
|
||||
_ = nk_integration.get_workouts()
|
||||
dologging("nklog.log","NK Auto import set for rower {id}".format(id=r.user.id))
|
||||
nk_integration = NKIntegration(r.user)
|
||||
_ = nk_integration.get_workouts()
|
||||
except: # pragma: no cover
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
dologging('processemail.log', ''.join('!! ' + line for line in lines))
|
||||
|
||||
#rowers = Rower.objects.filter(intervals_auto_import=True)
|
||||
#for r in rowers:
|
||||
# try:
|
||||
# if user_is_not_basic(r.user) or user_is_coachee(r.user):
|
||||
# intervals_integration = IntervalsIntegration(r.user)
|
||||
# _ = intervals_integration.get_workouts()
|
||||
# except:
|
||||
# exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
# lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
# dologging('processemail.log', ''.join('!! ' + line for line in lines))
|
||||
|
||||
self.stdout.write(self.style.SUCCESS(
|
||||
'Successfully processed email attachments'))
|
||||
|
||||
Reference in New Issue
Block a user