appier 1.34.0__tar.gz → 1.34.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {appier-1.34.0/src/appier.egg-info → appier-1.34.2}/PKG-INFO +1 -1
- {appier-1.34.0 → appier-1.34.2}/setup.py +1 -1
- {appier-1.34.0 → appier-1.34.2}/src/appier/asgi.py +4 -2
- {appier-1.34.0 → appier-1.34.2}/src/appier/base.py +11 -1
- {appier-1.34.0 → appier-1.34.2}/src/appier/base.pyi +8 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/scheduler.py +12 -1
- {appier-1.34.0 → appier-1.34.2/src/appier.egg-info}/PKG-INFO +1 -1
- {appier-1.34.0 → appier-1.34.2}/MANIFEST.in +0 -0
- {appier-1.34.0 → appier-1.34.2}/README.rst +0 -0
- {appier-1.34.0 → appier-1.34.2}/setup.cfg +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/__init__.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/amqp.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/api.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/async_neo.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/async_old.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/asynchronous.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/asynchronous.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/bus.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/bus.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/cache.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/cache.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/common.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/component.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/component.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/compress.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/config.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/controller.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/crypt.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/data.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/data.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/defines.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/exceptions.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/execution.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/export.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/extra.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/extra_neo.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/extra_old.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/geo.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/git.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/graph.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/http.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/legacy.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/log.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/meta.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/mock.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/model.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/model.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/model_a.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/mongo.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/observer.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/part.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/part.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/preferences.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/preferences.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/queuing.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/redisdb.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/request.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/res/static/css/base.css +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/res/static/images/favicon.ico +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/res/static/js/base.js +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/res/templates/error.html.tpl +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/res/templates/holder.html.tpl +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/res/templates/layout.html.tpl +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/scheduler.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/serialize.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/session.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/session.pyi +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/settings.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/smtp.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/storage.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/structures.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/__init__.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/base.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/cache.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/config.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/crypt.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/data.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/exceptions.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/export.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/graph.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/http.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/legacy.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/log.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/mock.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/model.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/part.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/preferences.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/queuing.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/request.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/scheduler.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/serialize.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/session.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/smtp.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/structures.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/typesf.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/util.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/test/validation.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/typesf.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/util.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier/validation.py +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier.egg-info/SOURCES.txt +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier.egg-info/dependency_links.txt +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier.egg-info/not-zip-safe +0 -0
- {appier-1.34.0 → appier-1.34.2}/src/appier.egg-info/top_level.txt +0 -0
|
@@ -135,11 +135,13 @@ class ASGIApp(object):
|
|
|
135
135
|
event = await receive()
|
|
136
136
|
|
|
137
137
|
if event["type"] == "lifespan.startup":
|
|
138
|
-
self.
|
|
138
|
+
if not self.is_started():
|
|
139
|
+
self.start()
|
|
139
140
|
await send(dict(type="lifespan.startup.complete"))
|
|
140
141
|
|
|
141
142
|
elif event["type"] == "lifespan.shutdown":
|
|
142
|
-
self.
|
|
143
|
+
if not self.is_stopped():
|
|
144
|
+
self.stop()
|
|
143
145
|
await send(dict(type="lifespan.shutdown.complete"))
|
|
144
146
|
running = False
|
|
145
147
|
|
|
@@ -94,7 +94,7 @@ NAME = "appier"
|
|
|
94
94
|
""" The name to be used to describe the framework while working
|
|
95
95
|
on its own environment, this is just a descriptive value """
|
|
96
96
|
|
|
97
|
-
VERSION = "1.34.
|
|
97
|
+
VERSION = "1.34.2"
|
|
98
98
|
""" The version of the framework that is currently installed
|
|
99
99
|
this value may be used for debugging/diagnostic purposes """
|
|
100
100
|
|
|
@@ -945,6 +945,7 @@ class App(
|
|
|
945
945
|
self.host = host
|
|
946
946
|
self.port = port
|
|
947
947
|
self.ssl = ssl
|
|
948
|
+
|
|
948
949
|
self.start()
|
|
949
950
|
|
|
950
951
|
method = getattr(self, "serve_" + server)
|
|
@@ -3649,6 +3650,15 @@ class App(
|
|
|
3649
3650
|
return False
|
|
3650
3651
|
return self.level < logging.INFO
|
|
3651
3652
|
|
|
3653
|
+
def is_running(self):
|
|
3654
|
+
return self.status == RUNNING
|
|
3655
|
+
|
|
3656
|
+
def is_started(self):
|
|
3657
|
+
return self.is_running()
|
|
3658
|
+
|
|
3659
|
+
def is_stopped(self):
|
|
3660
|
+
return self.status == STOPPED
|
|
3661
|
+
|
|
3652
3662
|
def serialize(self, value):
|
|
3653
3663
|
if value in legacy.STRINGS:
|
|
3654
3664
|
return value
|
|
@@ -59,6 +59,14 @@ class App:
|
|
|
59
59
|
**kwargs
|
|
60
60
|
) -> str: ...
|
|
61
61
|
def cron(self, job: JobFunction, cron: Cron) -> SchedulerTask: ...
|
|
62
|
+
def is_loaded(self) -> bool: ...
|
|
63
|
+
def is_parent(self) -> bool: ...
|
|
64
|
+
def is_child(self) -> bool: ...
|
|
65
|
+
def is_main(self) -> bool: ...
|
|
66
|
+
def is_devel(self) -> bool: ...
|
|
67
|
+
def is_running(self) -> bool: ...
|
|
68
|
+
def is_started(self) -> bool: ...
|
|
69
|
+
def is_stopped(self) -> bool: ...
|
|
62
70
|
def url_for(
|
|
63
71
|
self,
|
|
64
72
|
type: str,
|
|
@@ -30,7 +30,6 @@ __license__ = "Apache License, Version 2.0"
|
|
|
30
30
|
|
|
31
31
|
import time
|
|
32
32
|
import heapq
|
|
33
|
-
import calendar
|
|
34
33
|
import datetime
|
|
35
34
|
import logging
|
|
36
35
|
import threading
|
|
@@ -187,6 +186,12 @@ class SchedulerTask(object):
|
|
|
187
186
|
self.date = SchedulerDate.from_cron(cron)
|
|
188
187
|
self._enabled = True
|
|
189
188
|
|
|
189
|
+
def __repr__(self):
|
|
190
|
+
return "<SchedulerTask: %s, %s>" % (self.job, self.date)
|
|
191
|
+
|
|
192
|
+
def __str__(self):
|
|
193
|
+
return "<SchedulerTask: %s, %s>" % (self.job, self.date)
|
|
194
|
+
|
|
190
195
|
def __eq__(self, other):
|
|
191
196
|
if isinstance(other, self.__class__):
|
|
192
197
|
return True
|
|
@@ -223,6 +228,12 @@ class SchedulerDate(object):
|
|
|
223
228
|
self.months = self._parse_field(months, 1, 12)
|
|
224
229
|
self.days_of_week = self._parse_field(days_of_week, 0, 6)
|
|
225
230
|
|
|
231
|
+
def __repr__(self):
|
|
232
|
+
return "<SchedulerDate: %s>" % self.next_run()
|
|
233
|
+
|
|
234
|
+
def __str__(self):
|
|
235
|
+
return "<SchedulerDate: %s>" % self.next_run()
|
|
236
|
+
|
|
226
237
|
@classmethod
|
|
227
238
|
def from_cron(cls, cron):
|
|
228
239
|
if isinstance(cron, cls):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|