Switched shcedule to perform every 15 minutes
This commit is contained in:
@@ -116,28 +116,12 @@ class FreqtradeBot(LoggingMixin):
|
||||
self.update_funding_fees()
|
||||
self.wallets.update()
|
||||
|
||||
local_timezone = datetime.now(
|
||||
timezone.utc).astimezone().tzinfo
|
||||
minutes = self.time_zone_minutes(local_timezone)
|
||||
# TODO: This would be more efficient if scheduled in utc time, and performed at each
|
||||
# TODO: funding interval, specified by funding_fee_times on the exchange classes
|
||||
for time_slot in range(0, 24):
|
||||
t = str(time(time_slot, minutes))
|
||||
schedule.every().day.at(t).do(update)
|
||||
|
||||
def time_zone_minutes(self, local_timezone):
|
||||
"""
|
||||
Returns the minute offset of a timezone
|
||||
:param local_timezone: The operating systems timezone
|
||||
"""
|
||||
local_time = datetime.now(local_timezone)
|
||||
offset = local_time.utcoffset().total_seconds()
|
||||
half_hour_tz = (offset * 2) % 2 != 0.0
|
||||
quart_hour_tz = (offset * 4) % 4 != 0.0
|
||||
if quart_hour_tz:
|
||||
return 45
|
||||
elif half_hour_tz:
|
||||
return 30
|
||||
else:
|
||||
return 0
|
||||
for minutes in [0, 15, 30, 45]:
|
||||
t = str(time(time_slot, minutes))
|
||||
schedule.every().day.at(t).do(update)
|
||||
|
||||
def notify_status(self, msg: str) -> None:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user