Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AdventOfCode Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fginfo
Programmierwettbewerbe
AdventOfCode Proxy
Merge requests
!14
Scheduler
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Scheduler
scheduler
into
main
Overview
0
Commits
3
Pipelines
0
Changes
3
Merged
Jake
requested to merge
scheduler
into
main
1 year ago
Overview
0
Commits
3
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Compare
main
version 1
aa848e7c
1 year ago
main (base)
and
latest version
latest version
44713481
3 commits,
1 year ago
version 1
aa848e7c
2 commits,
1 year ago
3 files
+
20
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
aocp/__init__.py
+
14
−
0
Options
@@ -11,6 +11,7 @@ import json
import
pprint
from
flask
import
Blueprint
,
Flask
,
abort
,
redirect
,
render_template
,
request
,
session
,
url_for
from
flask_apscheduler
import
APScheduler
from
werkzeug.wrappers
import
Response
from
werkzeug.exceptions
import
BadRequest
,
Conflict
,
Forbidden
,
Unauthorized
@@ -149,6 +150,19 @@ def create_app(test_config=None):
# Initialize score
score
.
init_app
(
app
)
# initialize scheduler
scheduler
=
APScheduler
()
scheduler
.
init_app
(
app
)
@scheduler.task
(
'
interval
'
,
id
=
'
do_verifier
'
,
seconds
=
10
,
misfire_grace_time
=
900
)
def
verifier_job
():
with
app
.
app_context
():
app
.
logger
.
info
(
"
Running verifier job
"
)
verifier
.
verify
()
app
.
logger
.
info
(
"
Finished running verifier job
"
)
scheduler
.
start
()
return
app
def
get_fragments_blueprint
(
app
:
Flask
):
Loading