Skip to content

Instantly share code, notes, and snippets.

@thespacedoctor
Created December 19, 2017 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thespacedoctor/bbbff20ea87a4912f7a09770345998d5 to your computer and use it in GitHub Desktop.
Save thespacedoctor/bbbff20ea87a4912f7a09770345998d5 to your computer and use it in GitHub Desktop.
[Archive Stale Transients in Marshall] Archive Old Objects from the Marshall Inbox #marshall
-- To count the objects before you archive them:
select * from transientBucketSummaries t, pesstoObjects p where p.marshallWorkflowLocation = "inbox" and p.transientBucketId=t.transientBucketId and t.dateAdded < "2016-04-15";
-- and then to archive:
update transientBucketSummaries t, pesstoObjects p set p.marshallWorkflowLocation = "archive" where p.marshallWorkflowLocation = "inbox" and p.transientBucketId=t.transientBucketId and t.dateAdded < "2016-04-16";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment