Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
waldorf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
nimrod
waldorf
Commits
8452dfd5
Commit
8452dfd5
authored
4 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Address pre-commit issues.
parent
be11c084
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-compose.yml
+2
-1
2 additions, 1 deletion
docker-compose.yml
server.py
+1
-1
1 addition, 1 deletion
server.py
tasks.py
+2
-2
2 additions, 2 deletions
tasks.py
with
5 additions
and
4 deletions
docker-compose.yml
+
2
−
1
View file @
8452dfd5
...
@@ -21,7 +21,8 @@ services:
...
@@ -21,7 +21,8 @@ services:
depends_on
:
depends_on
:
-
rabbitmq
-
rabbitmq
environment
:
environment
:
BROKER_URL
:
&broker_url
amqp://waldorf:pass@rabbitmq/waldorf
# yamllint disable-line rule:line-length
BROKER_URL
:
&broker_url
amqp://waldorf:pass@rabbitmq/waldorf
# pragma: allowlist secret
FLASK_APP
:
server
FLASK_APP
:
server
FLASK_ENV
:
development
FLASK_ENV
:
development
healthcheck
:
healthcheck
:
...
...
This diff is collapsed.
Click to expand it.
server.py
+
1
−
1
View file @
8452dfd5
"""
Dummy web server using Flask.
"""
"""
Dummy web server using Flask.
"""
from
flask
import
Flask
,
request
,
jsonify
from
flask
import
Flask
,
request
,
jsonify
# pylint: disable=import-error
import
tasks
import
tasks
app
=
Flask
(
__name__
)
# pylint: disable=invalid-name
app
=
Flask
(
__name__
)
# pylint: disable=invalid-name
...
...
This diff is collapsed.
Click to expand it.
tasks.py
+
2
−
2
View file @
8452dfd5
"""
Celery worker.
"""
"""
Celery worker.
"""
import
logging
import
logging
import
os
import
os
from
celery
import
Celery
from
celery
import
Celery
# pylint: disable=import-error
BROKER_URL
=
os
.
getenv
(
"
BROKER_URL
"
)
BROKER_URL
=
os
.
getenv
(
"
BROKER_URL
"
)
...
@@ -11,4 +11,4 @@ app = Celery("tasks", broker=BROKER_URL) # pylint: disable=invalid-name
...
@@ -11,4 +11,4 @@ app = Celery("tasks", broker=BROKER_URL) # pylint: disable=invalid-name
@app.task
@app.task
def
log
(
message
):
def
log
(
message
):
"""
Log message.
"""
"""
Log message.
"""
logging
.
info
(
f
"
Message: %s
"
,
message
)
logging
.
info
(
"
Message: %s
"
,
message
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment