@@ -178,7 +178,9 @@ async def delete_project(app: web.Application, project_uuid: str, user_id: int)
178
178
await delete_project_from_db (app , project_uuid , user_id )
179
179
180
180
async def remove_services_and_data ():
181
- await remove_project_interactive_services (user_id , project_uuid , app )
181
+ await remove_project_interactive_services (
182
+ user_id , project_uuid , app , notify_users = False
183
+ )
182
184
await delete_project_data (app , project_uuid , user_id )
183
185
184
186
fire_and_forget_task (remove_services_and_data ())
@@ -195,9 +197,7 @@ async def retrieve_and_notify_project_locked_state(
195
197
196
198
197
199
async def remove_project_interactive_services (
198
- user_id : int ,
199
- project_uuid : str ,
200
- app : web .Application ,
200
+ user_id : int , project_uuid : str , app : web .Application , notify_users : bool = True
201
201
) -> None :
202
202
# NOTE: during the closing process, which might take awhile,
203
203
# the project is locked so no one opens it at the same time
@@ -214,8 +214,10 @@ async def remove_project_interactive_services(
214
214
user_id ,
215
215
await get_user_name (app , user_id ),
216
216
):
217
- # notify
218
- await retrieve_and_notify_project_locked_state (user_id , project_uuid , app )
217
+ if notify_users :
218
+ await retrieve_and_notify_project_locked_state (
219
+ user_id , project_uuid , app
220
+ )
219
221
220
222
# save the state if the user is not a guest. if we do not know we save in any case.
221
223
with suppress (director_exceptions .DirectorException ):
@@ -244,7 +246,8 @@ async def remove_project_interactive_services(
244
246
)
245
247
finally :
246
248
# notify when done and the project is closed
247
- await retrieve_and_notify_project_locked_state (user_id , project_uuid , app )
249
+ if notify_users :
250
+ await retrieve_and_notify_project_locked_state (user_id , project_uuid , app )
248
251
249
252
250
253
async def delete_project_data (
0 commit comments