Skip to content
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

V1.0.2 #287

Merged
merged 3 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stormpiper/requirements_unpinned.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ alembic

celery[redis]

fastapi
fastapi<0.100.0
starlette
pydantic
pydantic<2.0.0
httpx
orjson
uvicorn
Expand Down
2 changes: 1 addition & 1 deletion stormpiper/stormpiper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
All rights reserved.
"""

__version__ = "1.0.1"
__version__ = "1.0.2"
__author__ = "Austin Orr"
__email__ = "aorr@geosyntec.com"

Expand Down
26 changes: 8 additions & 18 deletions stormpiper/stormpiper/bg_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,13 @@ class Workflows:
can_raise=True, msg="update results"
)

# refresh_all = group( # chains of chords cannot propagate errors in celery
# chain(
# _group1,
# _group2,
# _group3,
# # check_results.s(msg="refresh all tables"),
# )
# ) | check_results.s(msg="finalize task")
refresh_all = group( # chains of chords cannot propagate errors in celery
chain(
_group1,
_group2,
_group3,
)
) | check_results.s(msg="finalize task")

# test_refresh = group( # these run out of order for some reason.
# chain(
Expand All @@ -267,16 +266,7 @@ class Workflows:

@celery_app.task(base=Singleton, acks_late=True, track_started=True)
def run_refresh_task():
# calling 'get' risks deadlocks in the backend. But since Celery won't propagate
# errors or pass signatures from chords, it appears to be impossible to work
# around this for a series workflow chains of chords rather than chains of tasks.
_ = Workflows._group1().get(disable_sync_subtasks=False, timeout=360)

_ = Workflows._group2().get(disable_sync_subtasks=False, timeout=1200)

_ = Workflows._group3().get(disable_sync_subtasks=False, timeout=360)

return True
return Workflows.refresh_all()


@celery_app.task(base=Singleton, acks_late=True, track_started=True)
Expand Down