File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
source/workspaces_app/workspaces_app/utils Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 55
66import logging
77import os
8- from . import date_utils
98
109TERMINATE_UNUSED_WORKSPACES = os .getenv ('TerminateUnusedWorkspaces' )
1110RESOURCE_UNAVAILABLE = 'ResourceUnavailable'
@@ -21,7 +20,7 @@ def is_terminate_workspace_enabled():
2120 return TERMINATE_UNUSED_WORKSPACES == "Yes" or TERMINATE_UNUSED_WORKSPACES == "Dry Run"
2221
2322
24- def check_if_workspace_used_for_selected_period (last_known_user_connection_timestamp ):
23+ def check_if_workspace_used_for_selected_period (last_known_user_connection_timestamp , first_day_selected_month ):
2524 """
2625 This method returns a boolean value to indicate if the workspace was used in selected period
2726 :param: last_known_user_connection_timestamp: Last known connection timestamp
@@ -36,7 +35,6 @@ def check_if_workspace_used_for_selected_period(last_known_user_connection_times
3635 return True
3736 else :
3837 log .debug ("Last know timestamp value is not None. Processing further." )
39- first_day_selected_month = date_utils .get_first_day_selected_month ()
4038 log .debug (f'First day for selected period is { first_day_selected_month } ' )
4139 last_known_user_connection_day = last_known_user_connection_timestamp .date ()
4240 return last_known_user_connection_day >= first_day_selected_month
You can’t perform that action at this time.
0 commit comments