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

    HardAtWork

    04/02/2023, 9:40 AM
    I believe the request in the Worker gets aborted, so iirc, you can't
  • s

    sathoro

    04/02/2023, 9:41 AM
    doesn't seem to get aborted - the ctx.waitUntil still runs seconds later
  • h

    HardAtWork

    04/02/2023, 9:42 AM
    I mean the Request path. Like, when you return a request, all execution(minus
    waitUntil
    ) is immediately aborted. So unless you have a way of monitoring the Request path from within the
    waitUntil
    , I don't think you can detect a cancelled request.
  • s

    sathoro

    04/02/2023, 9:45 AM
    we stream back a sub-request (with some modifications) to the client and bill for it in the ctx.waitUntil. and we allow our clients to cancel their request early so it would be nice if we could get a notification about the cancellation then we could cancel our sub-request too
  • c

    chientrm

    04/02/2023, 10:35 AM
    I got this error when connecting worker from Android (flutter):
    Copy code
    HandshakeException (HandshakeException: Handshake error in client (OS Error: 
        CERTIFICATE_VERIFY_FAILED: Hostname mismatch(handshake.cc:393)))
  • c

    chientrm

    04/02/2023, 10:35 AM
    However, the url work fine with browser 😐
  • c

    chientrm

    04/02/2023, 10:35 AM
    https
    url.
  • c

    chientrm

    04/02/2023, 10:43 AM
    oh, it was because my subdomain has underscore
    _
    .
  • h

    HelixEvo

    04/02/2023, 2:03 PM
    Does anyone use a worker as a fall back in the CF loadbalancer? I get denied IP because the fall back pool is the CF worker
  • p

    PhaxeNor

    04/03/2023, 8:39 AM
    Just curious, are cron triggers supposed to run only once as per their schedule? I have this
    0 6 * * 2
    and
    59 23 * * 7#1
    and both of these have ran twice within a very short time of each other (never done this before, and it's been running for months)
  • c

    calebhailey

    04/03/2023, 3:06 PM
    I also recently observed an event that appeared to fire twice, but I didn't even think anything of it
  • c

    calebhailey

    04/03/2023, 3:06 PM
    only happened once that I know of and hasn't happened again
  • c

    calebhailey

    04/03/2023, 3:13 PM
    are Pages Functions in "Advanced Mode" effectively the same as Workers? Like, can I just drop a Worker into a Pages project and rename the script to
    _worker.js
    ? https://developers.cloudflare.com/pages/platform/functions/advanced-mode/
  • w

    Walshy | Pages

    04/03/2023, 3:13 PM
    yep
  • c

    calebhailey

    04/03/2023, 3:14 PM
    ok, TIL!
  • c

    calebhailey

    04/03/2023, 3:14 PM
    I like the routing bits in Pages Functions, but the more I jump back and forth between Pages Functions and Workers I'm like "why aren't these just the same thing"... so apparently advanced mode is the answer?
  • w

    Walshy | Pages

    04/03/2023, 3:15 PM
    yep! Functions are just Workers but with nice routing
  • w

    Walshy | Pages

    04/03/2023, 3:16 PM
    _worker.js just allows you to skip the routing and use your Worker as is
  • c

    calebhailey

    04/03/2023, 3:16 PM
    and presumably still import from other modules? (my workers are usually split up into multiple files)
  • w

    Walshy | Pages

    04/03/2023, 3:17 PM
    You can import modules yes but for multiple files you'll want to bundle them together (like what Wrangler does for normal Workers)
  • c

    calebhailey

    04/03/2023, 3:17 PM
    kk
  • c

    calebhailey

    04/03/2023, 3:17 PM
    thx!
  • s

    Skye

    04/03/2023, 3:59 PM
    Hasn't wrangler done this for _worker.js for like 2 months now too
  • w

    Walshy | Pages

    04/03/2023, 4:00 PM
    oh yeah tru
  • w

    Walshy | Pages

    04/03/2023, 4:00 PM
    i forgot we enabled full on bundling
  • h

    hanpolo

    04/03/2023, 8:21 PM
    In the Workers dashboard there is a "Default environment" which in my case is set to production. However, I do not see that I have any way of changing this environment or assigning a different one. In my wrangler.toml I've defined a staging and production environment. However, I don't see any relation between the environment listed on the dashboard with the one in the toml. Any ideas how this dashboard default environment is supposed to be used?
  • j

    James

    04/03/2023, 8:32 PM
    Unfortunately you're seeing a bit of legacy stuff mixed with new/current stuff mixed with upcoming stuff - it's a bit confusing, sorry! I summarised this recently in a post on the forum: https://community.cloudflare.com/t/environments-vs-deployments/451036/2?u=cherryjimbo
  • j

    James

    04/03/2023, 8:32 PM
    cc @admah - this is a pretty common question and point of confusion and might make sense to extend official docs about 🙂
  • s

    Skye

    04/03/2023, 8:37 PM
    We could also just hide it in the dash for new workers
  • j

    James

    04/03/2023, 8:39 PM
    It's used all over the dash, like when you create routes and things too - I can definitely understand the confusion https://up.jross.me/se6v9lrz
1...237523762377...2509Latest