Skip to content

Commit

Permalink
Use utility function in other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Jun 8, 2024
1 parent 8f3015f commit 63a458a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fixity/fixity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import sys
import traceback
from argparse import ArgumentParser
from datetime import datetime
from time import sleep
from uuid import uuid4

from . import reporting
from . import storage_service
from . import utils
from .models import Report
from .models import Session

Expand Down Expand Up @@ -123,7 +123,7 @@ def scan(
# while attempting to respond to the request.
storage_service.get_single_aip(aip, ss_url, ss_user, ss_key)

start_time = datetime.utcnow()
start_time = utils.utcnow()

try:
if report_url:
Expand Down
4 changes: 2 additions & 2 deletions fixity/storage_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def scan_aip(
aip = AIP(uuid=aip_uuid)

if not start_time:
begun = datetime.utcnow()
begun = utils.utcnow()
else:
begun = start_time

Expand All @@ -203,7 +203,7 @@ def scan_aip(
)
except requests.ConnectionError:
raise StorageServiceError(UNABLE_TO_CONNECT_ERROR.format(ss_url))
ended = datetime.utcnow()
ended = utils.utcnow()

begun_int = int(calendar.timegm(begun.utctimetuple()))
ended_int = int(calendar.timegm(ended.utctimetuple()))
Expand Down

0 comments on commit 63a458a

Please sign in to comment.