@@ -250,22 +250,6 @@ def create_participant_groups(
250250 return tactical_group , notification_group
251251
252252
253- def delete_participant_groups (incident : Incident , db_session : SessionLocal ):
254- """Deletes the external participant groups."""
255- plugin = plugin_service .get_active_instance (
256- db_session = db_session , project_id = incident .project .id , plugin_type = "participant-group"
257- )
258- plugin .instance .delete (email = incident .tactical_group .email )
259- plugin .instance .delete (email = incident .notifications_group .email )
260-
261- event_service .log (
262- db_session = db_session ,
263- source = plugin .plugin .title ,
264- description = "Tactical and notification groups deleted" ,
265- incident_id = incident .id ,
266- )
267-
268-
269253def create_conference (incident : Incident , participants : List [str ], db_session : SessionLocal ):
270254 """Create external conference room."""
271255 plugin = plugin_service .get_active_instance (
@@ -285,24 +269,6 @@ def create_conference(incident: Incident, participants: List[str], db_session: S
285269 return conference
286270
287271
288- def delete_conference (incident : Incident , db_session : SessionLocal ):
289- """Deletes the conference."""
290- conference = conference_service .get_by_incident_id (
291- db_session = db_session , incident_id = incident .id
292- )
293- plugin = plugin_service .get_active_instance (
294- db_session = db_session , project_id = incident .project .id , plugin_type = "conference"
295- )
296- plugin .instance .delete (conference .conference_id )
297-
298- event_service .log (
299- db_session = db_session ,
300- source = plugin .plugin .title ,
301- description = "Incident conference deleted" ,
302- incident_id = incident .id ,
303- )
304-
305-
306272def create_incident_storage (
307273 incident : Incident , participant_group_emails : List [str ], db_session : SessionLocal
308274):
@@ -499,7 +465,7 @@ def remove_participant_from_tactical_group(
499465
500466@background_task
501467def incident_create_stable_flow (
502- * , incident_id : int , checkpoint : str = None , organization_slug : str = None , db_session = None
468+ * , incident_id : int , organization_slug : str = None , db_session = None
503469):
504470 """Creates all resources necessary when an incident is created as 'stable'."""
505471 incident_create_flow (incident_id = incident_id , db_session = db_session )
@@ -509,7 +475,7 @@ def incident_create_stable_flow(
509475
510476@background_task
511477def incident_create_closed_flow (
512- * , incident_id : int , checkpoint : str = None , organization_slug : str = None , db_session = None
478+ * , incident_id : int , organization_slug : str = None , db_session = None
513479):
514480 """Creates all resources necessary when an incident is created as 'closed'."""
515481 incident = incident_service .get (db_session = db_session , incident_id = incident_id )
@@ -533,14 +499,8 @@ def incident_create_closed_flow(
533499 db_session .commit ()
534500
535501
536- # TODO create some ability to checkpoint
537- # We could use the model itself as the checkpoint, commiting resources as we go
538- # Then checking for the existence of those resources before creating them for
539- # this incident.
540502@background_task
541- def incident_create_flow (
542- * , organization_slug : str , incident_id : int , checkpoint : str = None , db_session = None
543- ):
503+ def incident_create_flow (* , organization_slug : str , incident_id : int , db_session = None ):
544504 """Creates all resources required for new incidents."""
545505 incident = incident_service .get (db_session = db_session , incident_id = incident_id )
546506
0 commit comments