mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
Clear out expired customer share links
CustomerToken.purge_expired deletes share links that have expired or whose issue was deleted. It runs whenever a new link is made, so they don't pile up, and from rake redmine_qbo:purge_customer_tokens for a manual or scheduled run. Expired links were only ignored before. Also drops Issue's belongs_to :customer_token: issues have no such column, so the association could only raise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0d143e6eb1
commit
30c1f5181e
4 files changed
+63
-2
No files matched your search
@@ -21,4 +21,9 @@ namespace :redmine_qbo do
|
||||
|
||||
puts "Checked #{estimates.size} estimate(s), created #{total} relation(s)."
|
||||
end
|
||||
|
||||
desc "Delete customer share links that have expired or whose issue was deleted (also done whenever a link is made)"
|
||||
task purge_customer_tokens: :environment do
|
||||
puts "Deleted #{CustomerToken.purge_expired} customer share link(s)."
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user