Task doesn't stop running

I have a task for which I previously used a json file to store data, but I was running into issues with this after I deployed it on a scheduled deployment (it runs every half an hour). The JSON file was resetting each time back to what it had been when I deployed.

I switched to using a Replit database and it works fine, but my script now doesn’t stop running.

Here you can see the console log of my task which shows all the logging put in to try and see if there are any issues:

You can see the history of the runs which shows that it used to take around 30s, before I switched to the Replit database, and now I’ve had to cancel them all manually. The last one I started running 7 minutes ago is still running (even though the script had done everything it needed to within a few seconds).

I don’t know how to share a view only link to my Repl so here’s a pastebin link:

Thanks for any assistance,

Andrew

I can’t see a way to edit my post but I meant to upload this image second:

Unless you invite someone to your repl, the link shown in your brower’s URL bar is functionally read-only. (They can fork it however)

Thank you. Here’s the Repl in that case:
https://replit.com/@AndrewShowman/Gorgias-New-Survey-Tags-added-and-to-Slack