Chuck-NORRIS
Worker Guide
Last updated
Was this helpful?
Worker Guide
Last updated
Was this helpful?
Chuck Non-Operational Records & Related Images (NORRIS) is a scheduled worker built to delete (chuck) submission tracking records and Images that are no longer needed (non-operational).
Delete tracking records of successful submissions, older than 1 day, from the database.
Delete tracking records of hanging (incomplete) submissions, older than 1 day, from the database and their corresponding images from Cloudflare Images.
Delete tracking records of unsuccessful submissions, older than 30 days, from the database.
Show up here and there in the docs to make you smile!
Once, Every day, at 3:30am UTC.
Can be changed through the wrangler.toml
file or the Cloudflare Dashboard.
Since, UDP connections are not possible from Cloudflare workers, we need to communicate with our database through HTTP requests (TCP). Setting up an atlas app service (realm) instance, linked to our pendingsubmissions
collection would be required to make this happen.
This guide details this process:
.
Please ensure the following rule
configuration for the pendingsubmissions
collection:
Role
readAndWriteAll
Apply When
Always
Document Permissions
Read, Write, Search
Field Permissions
Read: All, Write: All
Chuck-NORRIS can delete the Recycling Bin!
Not really, but please be careful when setting up this rule. Make sure that 'Apply When' is set correctly and that the rule is applied to the correct collection to avoid inadvertent data loss.
The following environment variables are required:
Atlas App ID
Auth
Atlas App Service (Realm) API Key
Auth
Name of the MongoDB database to be accessed.
Identification
API key to access Cloudflare Images
Auth
Cloudflare Account ID
Auth
.