Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-5352] Messaging for account status changes #17

Closed
wants to merge 2 commits into from

Conversation

Johnetordoff
Copy link
Collaborator

@Johnetordoff Johnetordoff commented Feb 28, 2024

Simple PR for demos of sub-pub system

Currently a simple listener function in an easy to set up management command. Prints out simple message in addon_service logs.

OSF side:
CenterForOpenScience/osf.io#10550

Ticket:
https://openscience.atlassian.net/browse/ENG-5352

@Johnetordoff Johnetordoff force-pushed the sub-pub branch 2 times, most recently from ed4293d to a6a0dbb Compare February 29, 2024 16:23
@Johnetordoff Johnetordoff changed the title test subscription for disabled users prototype [ENG-5352] test subscription for disabled users prototype Feb 29, 2024
@@ -0,0 +1,8 @@
from django.core.management.base import BaseCommand
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for dev ease of use

def ready(self):
thread = threading.Thread(target=listen_for_osf_signals)
thread.daemon = True
thread.start()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's many ways we could go to set up an non-blocking task here. This was easiest because it was difficult to make this a task in celery because our GV side celery app isn't setup. Other methods, such as asyncio were investigated, but this was the shortest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant