forked from breatheco-de/apiv2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add task manager signals and expire subscriptions no paid
- Loading branch information
Showing
11 changed files
with
152 additions
and
86 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
from django.dispatch import Signal | ||
from task_manager.django.dispatch import Emisor | ||
|
||
emisor = Emisor('breathecode.admissions') | ||
|
||
# add your receives here | ||
student_edu_status_updated = Signal() | ||
cohort_saved = Signal() | ||
cohort_log_saved = Signal() | ||
cohort_user_created = Signal() | ||
cohort_stage_updated = Signal() | ||
student_edu_status_updated = emisor.signal('student_edu_status_updated') | ||
cohort_saved = emisor.signal('cohort_saved') | ||
cohort_log_saved = emisor.signal('cohort_log_saved') | ||
cohort_user_created = emisor.signal('cohort_user_created') | ||
cohort_stage_updated = emisor.signal('cohort_stage_updated') | ||
|
||
academy_saved = Signal() | ||
academy_saved = emisor.signal('academy_saved') | ||
|
||
# happens when any asset gets update inside the syllabus json for any version | ||
syllabus_asset_slug_updated = Signal() | ||
syllabus_asset_slug_updated = emisor.signal('syllabus_asset_slug_updated') | ||
|
||
syllabus_version_json_updated = Signal() | ||
syllabus_version_json_updated = emisor.signal('syllabus_version_json_updated') | ||
|
||
timeslot_saved = Signal() | ||
timeslot_saved = emisor.signal('timeslot_saved') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
For each signal you want other apps to be able to receive, you have to | ||
declare a new variable here like this: | ||
""" | ||
from django.dispatch import Signal | ||
"""For each signal you want other apps to be able to receive, you have to declare a new variable here like this.""" | ||
|
||
user_specialty_saved = Signal() | ||
from task_manager.django.dispatch import Emisor | ||
|
||
emisor = Emisor('breathecode.certificate') | ||
|
||
user_specialty_saved = emisor.signal('user_specialty_saved') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
For each signal you want other apps to be able to receive, you have to | ||
declare a new variable here like this: | ||
""" | ||
from django.dispatch import Signal | ||
"""For each signal you want other apps to be able to receive, you have to declare a new variable here like this.""" | ||
|
||
update_cache = Signal() | ||
from task_manager.django.dispatch import Emisor | ||
|
||
emisor = Emisor('breathecode.commons') | ||
|
||
update_cache = emisor.signal('update_cache') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
""" | ||
For each signal you want other apps to be able to receive, you have to | ||
declare a new variable here like this: | ||
""" | ||
from django.dispatch import Signal | ||
"""For each signal you want other apps to be able to receive, you have to declare a new variable here like this.""" | ||
|
||
event_saved = Signal() | ||
event_status_updated = Signal() | ||
new_event_attendee = Signal() | ||
new_event_order = Signal() | ||
from task_manager.django.dispatch import Emisor | ||
|
||
emisor = Emisor('breathecode.events') | ||
|
||
event_saved = emisor.signal('event_saved') | ||
event_status_updated = emisor.signal('event_status_updated') | ||
new_event_attendee = emisor.signal('new_event_attendee') | ||
new_event_order = emisor.signal('new_event_order') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
""" | ||
For each signal you want other apps to be able to receive, you have to | ||
declare a new variable here like this: | ||
""" | ||
from django.dispatch import Signal | ||
"""For each signal you want other apps to be able to receive, you have to declare a new variable here like this.""" | ||
|
||
downloadable_saved = Signal() | ||
from task_manager.django.dispatch import Emisor | ||
|
||
form_entry_won_or_lost = Signal() | ||
new_form_entry_deal = Signal() | ||
emisor = Emisor('breathecode.marketing') | ||
|
||
downloadable_saved = emisor.signal('downloadable_saved') | ||
|
||
form_entry_won_or_lost = emisor.signal('form_entry_won_or_lost') | ||
new_form_entry_deal = emisor.signal('new_form_entry_deal') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
""" | ||
For each signal you want other apps to be able to receive, you have to | ||
declare a new variable here like this: | ||
""" | ||
from django.dispatch import Signal | ||
"""For each signal you want other apps to be able to receive, you have to declare a new variable here like this.""" | ||
|
||
from task_manager.django.dispatch import Emisor | ||
|
||
emisor = Emisor('breathecode.payments') | ||
|
||
# consume a service | ||
consume_service = Signal() | ||
consume_service = emisor.signal('consume_service') | ||
|
||
# refund the units in case of error | ||
reimburse_service_units = Signal() | ||
reimburse_service_units = emisor.signal('reimburse_service_units') | ||
|
||
# manage of permissions for the service | ||
lose_service_permissions = Signal() | ||
grant_service_permissions = Signal() | ||
revoke_service_permissions = Signal() | ||
lose_service_permissions = emisor.signal('lose_service_permissions') | ||
grant_service_permissions = emisor.signal('grant_service_permissions') | ||
revoke_service_permissions = emisor.signal('revoke_service_permissions') | ||
|
||
# proxy to m2m_changed in Event.service_items | ||
update_plan_m2m_service_items = Signal() | ||
update_plan_m2m_service_items = emisor.signal('update_plan_m2m_service_items') | ||
|
||
# Plan aquired | ||
planfinancing_created = Signal() | ||
subscription_created = Signal() | ||
# Plan adquired | ||
planfinancing_created = emisor.signal('planfinancing_created') | ||
subscription_created = emisor.signal('subscription_created') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
For each signal you want other apps to be able to receive, you have to | ||
declare a new variable here like this: | ||
""" | ||
from django.dispatch import Signal | ||
"""For each signal you want other apps to be able to receive, you have to declare a new variable here like this.""" | ||
|
||
process_stripe_event = Signal() | ||
from task_manager.django.dispatch import Emisor | ||
|
||
emisor = Emisor('breathecode.provisioning') | ||
|
||
process_stripe_event = emisor.signal('process_stripe_event') |