Scheduled Worker failed(?) halfway but no errors shown.

Hi all! I'm facing the a problem with scheduled worker that runs every minute, The worker does the following:
  1. Query an API that returns ~1000 data points
  2. Loop through the data points and see if we find any thing that match a certain criteria
  3. If yes, send a message to Telegram (bot) & discord (using webhook)
    ---
    Currently, if I comment out the discord bot code, the code works fine. However, when I enable sending messages to discord, it fails. How do I know it fails?
This is because in the end of the code, there's a DB call to save the last processed values, that's not executed, and I'll only receive the message sent by telegram.

Issue faced:
  1. When I look at worker dashboard, I can see the requests sent, but the errors are 0
  2. When I try to look at Real Time logs, it doesn't show up.
  3. When I look at cron events tab, I can see the cron is triggered.
  4. When running locally, everything is working as expected.
Was this page helpful?