future-framework 3.0.1__tar.gz → 3.0.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.
- {future_framework-3.0.1 → future_framework-3.0.2}/PKG-INFO +1 -1
- {future_framework-3.0.1 → future_framework-3.0.2}/future/taskscheduler.py +6 -1
- {future_framework-3.0.1 → future_framework-3.0.2}/pyproject.toml +1 -1
- {future_framework-3.0.1 → future_framework-3.0.2}/LICENSE +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/README.md +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/application.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/Auth0Authentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/AzureADAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/BasicAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/KerberosAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/KeycloakAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/OAuth2Authentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/OpenIdConnectAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/SAMLAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/cli.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/controllers/DebugController.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/controllers/GraphQLController.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/controllers/OpenAPIController.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/controllers/WebSocketController.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/controllers/WelcomeController.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/controllers/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/database.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/ClickhouseDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/ElasticsearchDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/MongoDBDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/MySQLDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/PostgresDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/RedisDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/SQLiteDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/databases/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/exceptions.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/IAuthentication.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/IController.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/IDatabase.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/IMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/IModel.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/IPlugin.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/ITask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfaces/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/interfacing.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/lifespan.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/logger.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/BruteforcePreventionMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/CORSMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/CSRFMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/GZipMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/HTAccessConfuserMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/HeaderConfuserMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/RateLimitMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/ResponseCodeConfuserMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/SQLiConfuserMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/ScopeValidationMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/SessionMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/TestMiddlewareRequest.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/TestMiddlewareResponse.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/WebServerConfuserMiddleware.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/migrations.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/models/PostModel.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/models/Query.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/models/UserModel.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/models/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/openapi.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/plugins/ElasticsearchPlugin.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/plugins/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/request.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/response.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/routing.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/seeder.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/settings.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/CheckDNSTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/CheckDiskUsageTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/CheckHttpStatusTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/CheckMemoryUsageTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/CheckSSHBannerTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/CheckSystemUptimeTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/DailyBackupTask.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/SyncTaskExample.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/tasks/__init__.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/testclient.py +0 -0
- {future_framework-3.0.1 → future_framework-3.0.2}/future/types.py +0 -0
|
@@ -27,6 +27,7 @@ class ScheduledTask:
|
|
|
27
27
|
self.jitter = task.jitter
|
|
28
28
|
self.last_run: Optional[datetime] = None
|
|
29
29
|
self.next_run: Optional[datetime] = None
|
|
30
|
+
self.running = False
|
|
30
31
|
|
|
31
32
|
if self.start_time is None:
|
|
32
33
|
self.start_time = datetime.now()
|
|
@@ -85,6 +86,7 @@ class CronScheduler:
|
|
|
85
86
|
|
|
86
87
|
async def _run_task(self, scheduled: ScheduledTask) -> None:
|
|
87
88
|
"""Run a single task."""
|
|
89
|
+
scheduled.running = True
|
|
88
90
|
try:
|
|
89
91
|
log.debug(f"Running scheduled task '{scheduled.name}'")
|
|
90
92
|
await scheduled.task.run()
|
|
@@ -99,6 +101,8 @@ class CronScheduler:
|
|
|
99
101
|
except Exception as e:
|
|
100
102
|
log.error(f"Error running scheduled task '{scheduled.name}': {e}")
|
|
101
103
|
# Don't update last_run on error, so it will retry next cycle
|
|
104
|
+
finally:
|
|
105
|
+
scheduled.running = False
|
|
102
106
|
|
|
103
107
|
async def _scheduler_loop(self) -> None:
|
|
104
108
|
"""Main scheduler loop that checks for tasks to run."""
|
|
@@ -110,7 +114,8 @@ class CronScheduler:
|
|
|
110
114
|
|
|
111
115
|
# Check which tasks need to run
|
|
112
116
|
for scheduled in self.tasks.values():
|
|
113
|
-
if scheduled.next_run and now >= scheduled.next_run:
|
|
117
|
+
if scheduled.next_run and now >= scheduled.next_run and not scheduled.running:
|
|
118
|
+
scheduled.running = True
|
|
114
119
|
tasks_to_run.append(scheduled)
|
|
115
120
|
|
|
116
121
|
# Run tasks that are due
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/Auth0Authentication.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/AzureADAuthentication.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/BasicAuthentication.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/KerberosAuthentication.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/KeycloakAuthentication.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/OAuth2Authentication.py
RENAMED
|
File without changes
|
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/authentication/SAMLAuthentication.py
RENAMED
|
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
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/HTAccessConfuserMiddleware.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/HeaderConfuserMiddleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/SQLiConfuserMiddleware.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/ScopeValidationMiddleware.py
RENAMED
|
File without changes
|
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/TestMiddlewareRequest.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/TestMiddlewareResponse.py
RENAMED
|
File without changes
|
{future_framework-3.0.1 → future_framework-3.0.2}/future/middleware/WebServerConfuserMiddleware.py
RENAMED
|
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
|