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

⏲️ Add task to interrupt flow sessions after 90 days #4294

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

rowanseymour
Copy link
Member

@rowanseymour rowanseymour commented Feb 7, 2023

Adds #4293

I kinda wish tasks like this could live purely in mailroom but we don't have a way to schedule tasks for particular times yet in mailroom (see nyaruka/mailroom#30).

@@ -27,7 +29,6 @@
FlowStartCount,
)

FLOW_TIMEOUT_KEY = "flow_timeouts_%y_%m_%d"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

@@ -855,7 +855,8 @@
"check-elasticsearch-lag": {"task": "check_elasticsearch_lag", "schedule": timedelta(seconds=300)},
"delete-released-orgs": {"task": "delete_released_orgs", "schedule": crontab(hour=4, minute=0)},
"fail-old-messages": {"task": "fail_old_messages", "schedule": crontab(hour=0, minute=0)},
"resolve-twitter-ids-task": {"task": "resolve_twitter_ids", "schedule": timedelta(seconds=900)},
"interrupt-flow-sessions": {"task": "interrupt_flow_sessions", "schedule": crontab(hour=23, minute=30)},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that it runs before archiver

@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Merging #4294 (b438b85) into main (8cc178f) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #4294   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          450       450           
  Lines        25918     25932   +14     
=========================================
+ Hits         25918     25932   +14     
Impacted Files Coverage Δ
temba/flows/models.py 100.00% <100.00%> (ø)
temba/flows/tasks.py 100.00% <100.00%> (ø)
temba/mailroom/queue.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rowanseymour rowanseymour merged commit bf80843 into main Feb 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2023
@rowanseymour rowanseymour deleted the interrupt_flow_sessions branch February 8, 2023 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants