-
Notifications
You must be signed in to change notification settings - Fork 16
Adds celery==5.2.7
#610
Adds celery==5.2.7
#610
Changes from all commits
e0d4819
4ba6ffe
a73216f
d80b415
8ef2141
d2166ee
e623f44
592962d
d7fca72
b703cf5
9692e82
96d7949
1067cf1
e1eb995
6ceed35
a39d551
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ DRP_JWT_SECRET = "testdrpsecret" | |
LOG_LEVEL = "DEBUG" | ||
|
||
[execution] | ||
CELERY_BROKER_URL = "redis://:testpassword@redis:6379" | ||
CELERY_RESULT_BACKEND = "redis://:testpassword@redis:6379" | ||
Comment on lines
+29
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I missed this, is this other toml file just used for tests? Can we add a code comment about what this file is for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was also surprised to find this. Yes this file is just used in one test to check we can load the config in from a different path. The catch is that because of the way we validate configs, we need all the required vars in here (lest it throws a Will add a comment 👍 |
||
TASK_RETRY_COUNT = 0 | ||
TASK_RETRY_DELAY = 1 | ||
TASK_RETRY_BACKOFF = 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,11 +29,14 @@ DRP_JWT_SECRET = "secret" | |
LOG_LEVEL = "INFO" | ||
|
||
[execution] | ||
CELERY_BROKER_URL = "redis://:testpassword@redis:6379" | ||
CELERY_RESULT_BACKEND = "redis://:testpassword@redis:6379" | ||
MASKING_STRICT = true | ||
REQUIRE_MANUAL_REQUEST_APPROVAL = false | ||
TASK_RETRY_COUNT = 0 | ||
TASK_RETRY_DELAY = 1 | ||
TASK_RETRY_BACKOFF = 1 | ||
REQUIRE_MANUAL_REQUEST_APPROVAL = false | ||
MASKING_STRICT = true | ||
|
||
[root_user] | ||
ANALYTICS_OPT_OUT = false | ||
ANALYTICS_ID = "89187e1f107ebe56c35e4f864af83a90" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @eastandwestwind, as far as I'm aware we don't want to commit this correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct, we don't want this committed. I'll update such that we don't generate it if we have the ENV var set in this ticket- #559 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hey @seanpreston just checking, do you have the env var |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
alembic==1.6.5 | ||
APScheduler==3.8.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reminds me we were using celery back in the day and switched to apscheduler for some onetrust things (we also use it for webhook cleanup tasks too). Nothing to change here, just noting we might revert back to celery one day here to consolidate dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about this too, though it seemed like something we can save for another increment. There's also a serious discussion for us to have around ripping the Onetrust integration out entirely, since it's not used. This came up while removing |
||
boto3~=1.18.14 | ||
celery[pytest]==5.2.7 | ||
click==8.1.3 | ||
cryptography~=3.4.8 | ||
dask==2021.10.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from celery import Celery | ||
|
||
app = Celery("tasks") | ||
app.config_from_object("fidesops.core.config", namespace="EXECUTION") | ||
app.autodiscover_tasks(["fidesops.tasks", "fidesops.tasks.scheduled"]) | ||
|
||
|
||
if __name__ == "__main__": | ||
app.worker_main() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def test_create_task(celery_app, celery_worker): | ||
@celery_app.task | ||
def multiply(x, y): | ||
return x * y | ||
|
||
# Force `celery_app` to register our new task | ||
# See: https://github.com/celery/celery/issues/3642#issuecomment-369057682 | ||
celery_worker.reload() | ||
assert multiply.run(4, 4) == 16 | ||
assert multiply.delay(4, 4).get(timeout=10) == 16 | ||
Comment on lines
+1
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to self, this uses Celery's pytest fixtures https://docs.celeryq.dev/en/stable/userguide/testing.html#function-scope There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a testing issue I'm having in the next PR where That doesn't show up here since the new task is added to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog is looking out of date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything specific you can see that's missing here? Merging in
main
to this branch isn't yielding any conflicts or extra lines.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought 1.5.3 had already been released -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatted in person, my mistake, 1.5.3 was released from a different branch