-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create msg preprocessor #269
base: dev
Are you sure you want to change the base?
Conversation
Create a preprocessor that reads messages from a queue and combines the ones that have the same header (and are next to each other in the queue) into a single message. The combined messages are added to a new queue (which is then used for sending them).
Messages read from a queue (queuesimple) are generally in bytes, even when added as strings to the queue. For sender and receiver to work, the messages need to be converted to strings after they are read from the queue.
|
||
for dirpath, dirnames, files in os.walk(qpath): | ||
dirs_at_path = dirnames | ||
files_at_path = files |
Check notice
Code scanning / CodeQL
Unused local variable Note
for dirpath, dirnames, files in os.walk(qpath): | ||
dirs_at_path = dirnames | ||
files_at_path = files | ||
path_examined = qpath |
Check notice
Code scanning / CodeQL
Unused local variable Note
try: | ||
text = text.decode() | ||
originally_a_string = False | ||
except (UnicodeDecodeError, AttributeError): |
Check notice
Code scanning / CodeQL
Empty except Note
|
||
|
||
def _first_time_executing_code(previous_header): | ||
if previous_header == None: |
Check notice
Code scanning / CodeQL
Testing equality to None Note
|
||
from __future__ import print_function | ||
|
||
import ssm.agents |
Check notice
Code scanning / CodeQL
Unused import Note
from __future__ import print_function | ||
|
||
import ssm.agents | ||
from ssm import __version__, LOG_BREAK |
Check notice
Code scanning / CodeQL
Unused import Note
import ssm.agents | ||
from ssm import __version__, LOG_BREAK | ||
import os | ||
import logging |
Check notice
Code scanning / CodeQL
Unused import Note
from ssm import __version__, LOG_BREAK | ||
import os | ||
import logging | ||
from optparse import OptionParser |
Check notice
Code scanning / CodeQL
Unused import Note
raise ImportError('Dirq path_type requested but' | ||
'dirq module not found.') | ||
|
||
if (len(dirs_at_path) == 0 or |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
outq = QueueSimple(qpath) | ||
|
||
elif path_type == 'directory': | ||
if len(dirs_at_path) > 0: |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
Resolves #74