Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Flask_User_Reg
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Krish Moodbidri
Flask_User_Reg
Commits
4ed1e211
Commit
4ed1e211
authored
5 years ago
by
Mitchell Moore
Browse files
Options
Downloads
Patches
Plain Diff
complete base producer for ohpc/ood
parent
38ea871c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run.py
+8
-4
8 additions, 4 deletions
run.py
with
8 additions
and
4 deletions
run.py
+
8
−
4
View file @
4ed1e211
...
...
@@ -58,11 +58,15 @@ def ingest_data(json, methods=['GET', 'POST']):
channel
.
exchange_declare
(
exchange
=
'
direct_logs
'
,
exchange_type
=
'
direct
'
)
severity
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
'
info
'
message
=
'
'
.
join
(
sys
.
argv
[
2
:])
or
'
Hello World!
'
message
=
"
Hey there
"
# todo: account info goes here
channel
.
basic_publish
(
exchange
=
'
direct_logs
'
,
routing_key
=
"
ohpc
"
,
body
=
message
)
print
(
"
[x] Sent %r:%r
"
%
(
"
ohpc
"
,
message
))
channel
.
basic_publish
(
exchange
=
'
direct_logs
'
,
routing_key
=
severity
,
body
=
message
)
print
(
"
[x] Sent %r:%r
"
%
(
severity
,
message
))
exchange
=
'
direct_logs
'
,
routing_key
=
"
ood
"
,
body
=
message
)
print
(
"
[x] Sent %r:%r
"
%
(
"
ood
"
,
message
))
connection
.
close
()
# Todo: Make the remaining portion of this method in a RabbitMQ consumer
...
...
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