mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed daily execution of tasks for different timezones
This commit is contained in:
parent
75d8251a29
commit
64bb235011
@ -15,7 +15,7 @@ links = {
|
|||||||
requires = [
|
requires = [
|
||||||
"bottle>=0.12.16",
|
"bottle>=0.12.16",
|
||||||
"waitress>=1.3",
|
"waitress>=1.3",
|
||||||
"doreah>=1.6.10",
|
"doreah>=1.6.13",
|
||||||
"nimrodel>=0.6.4",
|
"nimrodel>=0.6.4",
|
||||||
"setproctitle>=1.1.10",
|
"setproctitle>=1.1.10",
|
||||||
"wand>=0.5.4",
|
"wand>=0.5.4",
|
||||||
|
@ -71,10 +71,8 @@ CHARTS_DISPLAY_TILES = false
|
|||||||
# prevent visitors from mindlessly clicking on those options and hogging your cpu
|
# prevent visitors from mindlessly clicking on those options and hogging your cpu
|
||||||
DISCOURAGE_CPU_HEAVY_STATS = false
|
DISCOURAGE_CPU_HEAVY_STATS = false
|
||||||
|
|
||||||
# Use system timezone by default. Otherwise specify as either:
|
# Offset in hours to UTC
|
||||||
# offset in hours IE 0 = UTC, -5 = EST
|
TIMEZONE = 0
|
||||||
# IANA time zone IE America/New_York = EST
|
|
||||||
TIMEZONE = None
|
|
||||||
|
|
||||||
[Fluff]
|
[Fluff]
|
||||||
|
|
||||||
|
@ -57,9 +57,6 @@ config(
|
|||||||
caching={
|
caching={
|
||||||
"folder": datadir("cache")
|
"folder": datadir("cache")
|
||||||
},
|
},
|
||||||
regular={
|
|
||||||
"autostart": False
|
|
||||||
},
|
|
||||||
auth={
|
auth={
|
||||||
"multiuser":False,
|
"multiuser":False,
|
||||||
"cookieprefix":"maloja",
|
"cookieprefix":"maloja",
|
||||||
@ -74,6 +71,10 @@ settingsconfig._readpreconfig()
|
|||||||
config(
|
config(
|
||||||
logging={
|
logging={
|
||||||
"logfolder": datadir("logs") if get_settings("LOGGING") else None
|
"logfolder": datadir("logs") if get_settings("LOGGING") else None
|
||||||
|
},
|
||||||
|
regular={
|
||||||
|
"autostart": False,
|
||||||
|
"offset": get_settings("TIMEZONE")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,13 +6,9 @@ from os.path import commonprefix
|
|||||||
import math
|
import math
|
||||||
from doreah.settings import get_settings
|
from doreah.settings import get_settings
|
||||||
|
|
||||||
# use system timezone as default
|
|
||||||
# https://stackoverflow.com/a/39079819/1469797
|
|
||||||
TIMEZONE = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo
|
|
||||||
# if user specifies a timezone in settings then try to use that instead
|
|
||||||
OFFSET = get_settings("TIMEZONE")
|
OFFSET = get_settings("TIMEZONE")
|
||||||
if OFFSET is not None:
|
TIMEZONE = timezone(timedelta(hours=OFFSET))
|
||||||
TIMEZONE = timezone(timedelta(hours=OFFSET))
|
|
||||||
|
|
||||||
FIRST_SCROBBLE = int(datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).timestamp())
|
FIRST_SCROBBLE = int(datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).timestamp())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user