|
@@ -1,13 +1,12 @@
|
|
from datetime import timedelta, datetime
|
|
from datetime import timedelta, datetime
|
|
|
|
|
|
import model
|
|
import model
|
|
-from model import cleanup
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
timeout = float(input('How long will the initial selling be available? (minutes):'))
|
|
timeout = float(input('How long will the initial selling be available? (minutes):'))
|
|
try:
|
|
try:
|
|
expiry = datetime.strptime(model.current_db_time(), '%Y-%m-%d %H:%M:%S') + timedelta(minutes=timeout)
|
|
expiry = datetime.strptime(model.current_db_time(), '%Y-%m-%d %H:%M:%S') + timedelta(minutes=timeout)
|
|
print(model.new_stock(expiry))
|
|
print(model.new_stock(expiry))
|
|
- cleanup()
|
|
|
|
|
|
+ model.cleanup()
|
|
except OverflowError:
|
|
except OverflowError:
|
|
print('The expiration time is too far in the future.')
|
|
print('The expiration time is too far in the future.')
|