Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
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
Container 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
geant-swd
dashboardv3
inventory-provider
Commits
f9b4f111
Commit
f9b4f111
authored
6 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
added startup logging messages
parent
25c6fef0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inventory_provider/__init__.py
+6
-1
6 additions, 1 deletion
inventory_provider/__init__.py
inventory_provider/tasks/worker.py
+3
-0
3 additions, 0 deletions
inventory_provider/tasks/worker.py
with
9 additions
and
1 deletion
inventory_provider/__init__.py
+
6
−
1
View file @
f9b4f111
...
...
@@ -38,6 +38,9 @@ def create_app():
if
"
SETTINGS_FILENAME
"
not
in
os
.
environ
:
assert
False
,
\
"
environment variable SETTINGS_FILENAME
'
must be defined
"
logging
.
info
(
"
initializing Flask with config from: %r
"
%
app
.
config
[
"
SETTINGS_FILENAME
"
])
app
.
config
.
from_envvar
(
"
SETTINGS_FILENAME
"
)
assert
"
INVENTORY_PROVIDER_CONFIG_FILENAME
"
in
app
.
config
,
(
...
...
@@ -51,8 +54,10 @@ def create_app():
from
inventory_provider
import
config
with
open
(
app
.
config
[
"
INVENTORY_PROVIDER_CONFIG_FILENAME
"
])
as
f
:
# test the config file can be loaded
logging
.
info
(
"
loading config from: %r
"
%
app
.
config
[
"
INVENTORY_PROVIDER_CONFIG_FILENAME
"
])
app
.
config
[
"
INVENTORY_PROVIDER_CONFIG
"
]
=
config
.
load
(
f
)
logging
.
debug
(
app
.
config
)
logging
.
info
(
'
Inventory Provider Flask app initialized
'
)
return
app
This diff is collapsed.
Click to expand it.
inventory_provider/tasks/worker.py
+
3
−
0
View file @
f9b4f111
...
...
@@ -67,6 +67,9 @@ class InventoryTask(Task):
class
WorkerArgs
(
bootsteps
.
Step
):
def
__init__
(
self
,
worker
,
config_filename
,
**
options
):
with
open
(
config_filename
)
as
f
:
task_logger
=
logging
.
getLogger
(
constants
.
TASK_LOGGER_NAME
)
task_logger
.
info
(
"
Initializing worker with config from: %r % config_filename)
"
InventoryTask
.
config
=
config
.
load
(
f
)
...
...
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