forked from Visualistic-Studios/Media-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_server.py
50 lines (37 loc) · 1.66 KB
/
app_server.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# _____ _
# |_ _| | |
# | | _ __ ___ _ __ ___ _ __| |_ ___
# | || '_ ` _ \| '_ \ / _ \| '__| __/ __|
# _| || | | | | | |_) | (_) | | | |_\__ \
# \___/_| |_| |_| .__/ \___/|_| \__|___/
# | |
# |_|
# -----------------------------------------------------------------------
from time import sleep
from resources.config import settings_core
from resources.server import mm_server
# _ _ _ _ _
# | | | | (_) | | | |
# | | | | __ _ _ __ _ __ _| |__ | | ___ ___
# | | | |/ _` | '__| |/ _` | '_ \| |/ _ \/ __|
# \ \_/ / (_| | | | | (_| | |_) | | __/\__ \
# \___/ \__,_|_| |_|\__,_|_.__/|_|\___||___/
# -----------------------------------------------------------------------
settings = settings_core()
server = mm_server()
# ___ _ _ _ _
# / _ \ | (_) | | (_)
# / /_\ \_ __ _ __ | |_ ___ __ _| |_ _ ___ _ __
# | _ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ \
# | | | | |_) | |_) | | | (_| (_| | |_| | (_) | | | |
# \_| |_/ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|
# | | | |
# |_| |_|
# -----------------------------------------------------------------------
########## APPLICATION LOOP
#####
while True:
## Process Pending Posts
server.process_pending_scheduled_posts()
## Sleep for the specified amount of time
sleep(settings.processing_delay_in_seconds)