Cosmetic tweaks
This commit is contained in:
parent
a7070f5ef5
commit
1f83971dcd
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"NotificationsSent": [
|
"NotificationsSent": [
|
||||||
"UID1",
|
"UID1",
|
||||||
"UID1",
|
"UID2",
|
||||||
"UID1"
|
"UID3"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -48,7 +48,7 @@ def isIDInSentNotifications(inboundPlanId):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def isShipmentWithinSpecifiedDelta(shipmentCreationTime):
|
def isShipmentWithinSpecifiedDelta(shipmentCreationTime, delta=360):
|
||||||
currentTime = datetime.now()
|
currentTime = datetime.now()
|
||||||
shipmentTime = datetime.strptime(shipmentCreationTime, '%Y-%m-%dT%H:%M:%SZ')
|
shipmentTime = datetime.strptime(shipmentCreationTime, '%Y-%m-%dT%H:%M:%SZ')
|
||||||
timeDelta = currentTime - shipmentTime
|
timeDelta = currentTime - shipmentTime
|
||||||
@ -57,7 +57,7 @@ def isShipmentWithinSpecifiedDelta(shipmentCreationTime):
|
|||||||
log(f'Shipment creation time: {shipmentTime}', 'info')
|
log(f'Shipment creation time: {shipmentTime}', 'info')
|
||||||
log(f'Time delta: {timeDelta}', 'info')
|
log(f'Time delta: {timeDelta}', 'info')
|
||||||
|
|
||||||
if timeDelta < timedelta(minutes=360):
|
if timeDelta < timedelta(minutes=delta):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user