mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: enable print logs for background workers when in DEBUG mode (#1357)
This commit is contained in:
parent
bfac39f1bc
commit
33cfbbf153
@ -169,6 +169,8 @@ def analytic_export_task(email, data, slug):
|
||||
msg.send(fail_silently=False)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -39,5 +39,8 @@ def email_verification(first_name, email, token, current_site):
|
||||
msg.send()
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -37,5 +37,8 @@ def forgot_password(first_name, email, uidb64, token, current_site):
|
||||
msg.send()
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -175,5 +175,8 @@ def service_importer(service, importer_id):
|
||||
importer = Importer.objects.get(pk=importer_id)
|
||||
importer.status = "failed"
|
||||
importer.save()
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -1006,5 +1006,8 @@ def issue_activity(
|
||||
)
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -31,4 +31,7 @@ def magic_link(email, key, token, current_site):
|
||||
return
|
||||
except Exception as e:
|
||||
capture_exception(e)
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
return
|
||||
|
@ -50,5 +50,8 @@ def project_invitation(email, project_id, token, current_site):
|
||||
except (Project.DoesNotExist, ProjectMemberInvite.DoesNotExist) as e:
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -29,5 +29,8 @@ def send_welcome_slack(user_id, created, message):
|
||||
print(f"Got an error: {e.response['error']}")
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
@ -66,5 +66,8 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor):
|
||||
except (Workspace.DoesNotExist, WorkspaceMemberInvite.DoesNotExist) as e:
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user