Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mick, Johanna
lab-stream
Commits
d6cea298
Commit
d6cea298
authored
Mar 02, 2021
by
Nane Kratzke
Browse files
Message generation
parent
87914ee3
Changes
1
Hide whitespace changes
Inline
Side-by-side
producer/pubsub.py
View file @
d6cea298
...
@@ -10,7 +10,7 @@ stream = redis.Redis(host=host, port=port, db=0)
...
@@ -10,7 +10,7 @@ stream = redis.Redis(host=host, port=port, db=0)
me
=
socket
.
gethostname
()
me
=
socket
.
gethostname
()
i
=
1
i
=
1
while
True
:
while
True
:
msg
=
f
"Hi, this is
the
message #
{
i
}
from
{
me
}
."
msg
=
f
"Hi, this is message #
{
i
}
from
{
me
}
."
i
=
i
+
1
i
=
i
+
1
n
=
random
.
randint
(
1
,
3
)
n
=
random
.
randint
(
1
,
3
)
time
.
sleep
(
n
)
time
.
sleep
(
n
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment