@@ -215,7 +215,7 @@ def __add_running_id(
215215 attribute_name : str ,
216216 for_retokenization : bool = True ,
217217):
218- session_token = general .get_ctx_token ()
218+ general .get_ctx_token ()
219219 attribute .add_running_id (
220220 project_id , attribute_name , for_retokenization , with_commit = True
221221 )
@@ -231,7 +231,7 @@ def __add_running_id(
231231 "project_id" : str (project_id ),
232232 },
233233 )
234- general .remove_and_refresh_session (session_token )
234+ general .remove_and_refresh_session ()
235235
236236
237237def calculate_user_attribute_missing_records (
@@ -301,7 +301,7 @@ def __calculate_user_attribute_missing_records(
301301 attribute_id : str ,
302302 include_rats : bool ,
303303) -> None :
304- session_token = general .get_ctx_token ()
304+ general .get_ctx_token ()
305305
306306 all_records_count = record .count (project_id )
307307 count_delta = record .count_missing_delta (project_id , attribute_id )
@@ -329,7 +329,7 @@ def __calculate_user_attribute_missing_records(
329329 attribute_id = attribute_id ,
330330 log = "Attribute calculation failed" ,
331331 )
332- general .remove_and_refresh_session (session_token )
332+ general .remove_and_refresh_session ()
333333 return
334334
335335 util .add_log_to_attribute_logs (
@@ -354,7 +354,7 @@ def __calculate_user_attribute_missing_records(
354354 attribute_id = attribute_id ,
355355 log = "Writing to the database failed." ,
356356 )
357- general .remove_and_refresh_session (session_token )
357+ general .remove_and_refresh_session ()
358358 return
359359 util .add_log_to_attribute_logs (project_id , attribute_id , "Finished writing." )
360360
@@ -394,7 +394,7 @@ def __calculate_user_attribute_missing_records(
394394 attribute_id = attribute_id ,
395395 log = "Writing to the database failed." ,
396396 )
397- general .remove_and_refresh_session (session_token )
397+ general .remove_and_refresh_session ()
398398 return
399399
400400 else :
@@ -410,7 +410,7 @@ def __calculate_user_attribute_missing_records(
410410 attribute_id = attribute_id ,
411411 log = "Writing to the database failed." ,
412412 )
413- general .remove_and_refresh_session (session_token )
413+ general .remove_and_refresh_session ()
414414 return
415415 util .set_progress (project_id , attribute_item , 1.0 )
416416 attribute .update (
@@ -424,7 +424,7 @@ def __calculate_user_attribute_missing_records(
424424 notification .send_organization_update (
425425 project_id , f"calculate_attribute:finished:{ attribute_id } "
426426 )
427- general .remove_and_refresh_session (session_token )
427+ general .remove_and_refresh_session ()
428428
429429
430430def __notify_attribute_calculation_failed (
0 commit comments