Adding ugrep task to grep worker#168
Open
spop3000 wants to merge 2 commits into
Open
Conversation
hacktobeer
requested changes
Jun 4, 2026
| "task_config": [ | ||
| { | ||
| "name": "pattern", | ||
| "label": "", |
| "required": True, | ||
| }, | ||
| { | ||
| "name": "invert-match", |
Contributor
There was a problem hiding this comment.
make it invert_match to be consistent with other workers.
|
|
||
|
|
||
| @celery.task(bind=True, name=TASK_NAME, metadata=TASK_METADATA) | ||
| def command( |
Contributor
There was a problem hiding this comment.
Please implement the OpenRelik Logger module as per openrelik-worker-template.
- https://github.com/openrelik/openrelik-worker-template/blob/main/src/tasks.py#L8
- https://github.com/openrelik/openrelik-worker-template/blob/main/src/tasks.py#L33
- https://github.com/openrelik/openrelik-worker-template/blob/main/src/tasks.py#L37
- https://github.com/openrelik/openrelik-worker-template/blob/main/src/tasks.py#L68
|
|
||
| output_files.append(output_file.to_dict()) | ||
|
|
||
| if not output_files: |
Contributor
There was a problem hiding this comment.
This will never execute, there will always be output_files. I would
- remove this
OR - check if there is indeed output from ugrep and if not generate a logger.warning() message that ugrep produced no output instead of a RuntimeError.
Removing this seems fine imo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.