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

    sirhype

    03/23/2023, 1:26 AM
    (curious, planning on using for my Worker)
  • c

    Cyb3r-Jok3

    03/23/2023, 1:26 AM
    You can use it else where but it is free from workers
  • k

    Keizer

    03/23/2023, 1:32 AM
    So I added the custom domain but it didn't add an "A" record type. Do I need to add a route under trigger also for the domain?
  • k

    Keizer

    03/23/2023, 1:33 AM
    It just added a record type of "Worker"
  • s

    sirhype

    03/23/2023, 1:34 AM
    Gotcha, so if someone tried to use the API from a non-Worker service it wouldn't work without them paying. Aka there's some IP/infra based verification?
  • c

    Cyb3r-Jok3

    03/23/2023, 1:35 AM
    No the custom domain is the trigger
  • k

    Keizer

    03/23/2023, 1:35 AM
    I get NXDOMAN unfort
  • k

    Keizer

    03/23/2023, 1:36 AM
    My zone is managed in CF
  • c

    Cyb3r-Jok3

    03/23/2023, 1:36 AM
    Yeah. Don't know how it works for other service but it only works with workers it only works on deployed workers not local or quick edit
  • s

    sirhype

    03/23/2023, 1:36 AM
    Ah gotcha, so I'll need to deploy my code to test it thank you!
  • c

    Cyb3r-Jok3

    03/23/2023, 1:37 AM
    Never used it but I think
    wrangler dev
    should work but not
    wrangler dev --local
  • s

    sirhype

    03/23/2023, 1:37 AM
    Makes sense, appreciate the help!
  • s

    sirhype

    03/23/2023, 2:25 AM
    I'm using slshx for Discord Slash Commands (using Miniflare) and I'm randomly getting:
    Copy code
    [mf:err] POST /: NotSupportedError: Unrecognized name.
    When I try to upgrade miniflare + wrangler I get:
    Copy code
    [mf:err] POST /: TypeError: Failed to parse URL from [object Object]
    I didn't do anything so I have no idea why this happened. A quick search shows this thread from last year: https://github.com/cloudflare/miniflare/issues/144 But it should've been patched as far as I can tell with 2.1.0 🤔 Any ideas?
  • a

    AwesomestGamer

    03/23/2023, 4:04 AM
    Is there a guarantee of the KV propagation time in the same zone, or is it still 60 seconds? In other words, can I expect that if a worker invoked by a user stores something in KV, if the same user asks for the value back it wouldn't be a full 60 seconds until he gets the correct result?
  • u

    Unsmart | Tech debt

    03/23/2023, 4:19 AM
    KV isn't delayed by 60s because of propagation it's delayed because it caches values on read for 60s
  • u

    Unsmart | Tech debt

    03/23/2023, 4:20 AM
    This explains it more fully: https://developers.cloudflare.com/workers/learning/how-kv-works/
  • a

    AwesomestGamer

    03/23/2023, 4:25 AM
    So is it basically impossible to build applications where the user needs to be able to modify data and use it on workers
  • u

    Unsmart | Tech debt

    03/23/2023, 4:26 AM
    It's fully possible
  • u

    Unsmart | Tech debt

    03/23/2023, 4:27 AM
    In the same colo a write will update it's cache which means it's instantly available (for the most part)
  • u

    Unsmart | Tech debt

    03/23/2023, 4:27 AM
    But also you can use multiple key value pairings instead of one huge blob for everything
  • b

    Brian.

    03/23/2023, 7:07 AM
    If you need a guaranteed read, you can use a durable object to manage the write and reads.
  • c

    Crazy Rabbit

    03/23/2023, 2:03 PM
    screencast-from-2023-03-23-15-01-06
  • c

    Crazy Rabbit

    03/23/2023, 2:03 PM
    Look at the version
  • c

    Crazy Rabbit

    03/23/2023, 2:04 PM
    I have removed cache multiple times from dashboard and also with:
    Copy code
    js
    await this.cache.delete("https://api.rabbitserverlist.com?key=" + key);
  • c

    Crazy Rabbit

    03/23/2023, 2:08 PM
    It's getting less and less noticable over time but even after half an hour I'm still sometimes seeing 1.19.4 instead of 1.19.3
  • b

    Brendan Irvine-Broque

    03/23/2023, 2:09 PM
    The first set of Node.js APIs have officially landed in Cloudflare Workers — 
    AsyncLocalStorage
    ,
    EventEmitter
    ,
    Buffer
    ,
    assert
    , and
    util
    . No polyfills required — these are the real deal. **Blog post**: https://blog.cloudflare.com/workers-node-js-asynclocalstorage/ **Docs**: https://developers.cloudflare.com/workers/runtime-apis/nodejs/ You can try these out in your Worker today, by enabling the
    nodejs_compat
    compatibility flag in your
    wrangler.toml
    We'd love to hear what you think! cc @User
  • c

    Crazy Rabbit

    03/23/2023, 2:44 PM
    Does
    await caches.default.delete(key)
    globally remove data from all servers / data centers? Probably not right?
  • k

    kian

    03/23/2023, 2:45 PM
    Nope, just for that single colo
  • c

    Crazy Rabbit

    03/23/2023, 2:46 PM
    So the "best" way to remove item from cache globally ("instantly") is to not use cache at all or to set it something small like a minute?
  • e

    Erisa | Support Engineer

    03/23/2023, 2:52 PM
    or use the CF API to purge
1...235523562357...2509Latest