-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from SANDAG/ABM3_develop_max_disk_space
Get maximum disk usage, update disk space check
- Loading branch information
Showing
5 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ActivitySim | ||
# See full license in LICENSE.txt. | ||
import os | ||
import logging | ||
import win32com.client as win32 | ||
|
||
from activitysim.core import inject | ||
|
||
logger = logging.getLogger("activitysim") | ||
|
||
@inject.step() | ||
def check_disk_usage(): | ||
output_dir = inject.get_injectable("output_dir") | ||
path = os.path.abspath(os.path.join(output_dir, "..", "..")) | ||
disk_usage = win32.Dispatch('Scripting.FileSystemObject').GetFolder(path).Size | ||
logger.info("Disk space usage: %f GB" % (disk_usage / (1024 ** 3))) |
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