https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • d

    dave

    02/19/2023, 2:24 AM
    did not change anything in my wrangler.toml
  • d

    dave

    02/19/2023, 2:25 AM
    http://sns.email.ai.moda:2082/
    no longer hits my Worker 🙂
  • d

    dave

    02/19/2023, 2:37 AM
    is that brave or something?
  • c

    cmg

    02/19/2023, 2:42 AM
    yep
  • w

    Wichard

    02/19/2023, 8:56 AM
    how can I print the current time in microseconds when doing a console.log inside a worker?
  • h

    HardAtWork

    02/19/2023, 8:59 AM
    You can do Date.now(), but that will be the time of last I/O, and only at millisecond accuracy
  • h

    HardAtWork

    02/19/2023, 9:00 AM
    You might be able to see it in LogPush/Tail events, though I’m not 100% sure whether that is also millisecond accuracy
  • w

    Wichard

    02/19/2023, 9:02 AM
    was looking at using performance.now() but doesnt seem available
  • h

    HardAtWork

    02/19/2023, 9:02 AM
    Yeah, they specifically disable the most accurate timekeeping systems to help negate Spectre attacks
  • k

    kian

    02/19/2023, 9:19 AM
    there’s a feature request to support performance.now but all it’d do is call date.now anyhow
  • k

    kian

    02/19/2023, 9:19 AM
    just for library compat
  • m

    Muhymin

    02/19/2023, 1:47 PM
    A few hours ago, one of my Cloudflare Workers suddenly started throwing an error,
    The script will never generate a response.
    . When I added a bunch of `console.log`s here and there, the issue got fixed. And when I removed them, the error started happening again.
  • m

    Muhymin

    02/19/2023, 1:48 PM
    I didn't track down exactly where the error was coming from. But after a few hours, now I see that, the error has gone automatically
  • k

    kian

    02/19/2023, 1:50 PM
    One of the main causes is depending on promises from other requests so it could be a global scope thing that’s only happening with concurrent requests?
  • c

    Crazy Rabbit

    02/19/2023, 5:21 PM
  • c

    Crazy Rabbit

    02/19/2023, 5:21 PM
    Are Subrequests always counted as cached?
  • h

    HardAtWork

    02/19/2023, 5:23 PM
    They shouldn't be?
  • c

    Crazy Rabbit

    02/19/2023, 5:23 PM
    So subrequests are fetches inside worker?
  • h

    HardAtWork

    02/19/2023, 5:24 PM
    Yes
  • c

    Crazy Rabbit

    02/19/2023, 5:24 PM
    for example when I'm fetching dns records
  • c

    Crazy Rabbit

    02/19/2023, 5:24 PM
    but why and how are all of them cached?
  • h

    HardAtWork

    02/19/2023, 5:26 PM
    I believe
    fetch
    is automatically cached according to your zone rules, unless you ask it not to.
  • c

    Crazy Rabbit

    02/19/2023, 5:27 PM
    but wouldn't at least first request be uncached?
  • c

    Crazy Rabbit

    02/19/2023, 5:27 PM
    as it doesn't know the result
  • h

    HardAtWork

    02/19/2023, 5:27 PM
    🤷
  • d

    dave

    02/19/2023, 5:53 PM
    Is there a way to use wrangler.toml to configure email workers?
  • k

    kian

    02/19/2023, 5:54 PM
    Nada
  • d

    dave

    02/19/2023, 5:55 PM
    so does one worker just get all of the emails?
  • k

    kian

    02/19/2023, 5:55 PM
    Nope - you setup the consuming Worker in the Email Routing setting
  • k

    kian

    02/19/2023, 5:56 PM
1...228922902291...2509Latest