https://discord.cloudflare.com logo
Join Discord
Powered by
# durable-objects
  • j

    jmshal

    04/04/2021, 6:49 PM
    Copy code
    name = "product-storm-vision-boards"
    type = "javascript"
    account_id = "b101faaaf8843f206754bbb5bbeb2232"
    
    [env.development]
    route = "product-storm.bebapps.dev/api/vision-boards/*"
    zone_id = "ebabedaf8bb45940a9a5de464056845f"
    
    [env.production]
    route = "product-storm.bebapps.com/api/vision-boards/*"
    zone_id = "a3cf22a5908ef8667a204a640d0a65d8"
    
    [build]
    # upload_dir = "dist"
    upload_format = "modules"
    
    [durable_objects]
    bindings = [
      { name = "visionBoards", class_name = "VisionBoard" }
    ]
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:50 PM
    Ah, check out the #818615097731317802 channel (https://discord.com/channels/595317990191398933/799437470004412476/818627810276409376). Literally just had this conversation actually.
  • j

    jmshal

    04/04/2021, 6:50 PM
    Thanks Greg, I'll take a look now!
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:51 PM
    TL;DR, define them in
    [env.production.durable_objects]
  • j

    jmshal

    04/04/2021, 6:52 PM
    Yeah, thanks Greg. I wish I had tried that yesterday. I went to bed in a grump because I wasn't able to figure it out after like 4 hours of trying hahaha.
  • j

    jmshal

    04/04/2021, 6:52 PM
    That's what you get when you ask for the bleeding edge though. So no hard feelings ๐Ÿ™‚
  • j

    jmshal

    04/04/2021, 6:52 PM
    Much much appreciated!
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:52 PM
    Never go to bed angry with Workers ๐Ÿ˜‰
  • j

    jmshal

    04/04/2021, 6:53 PM
    Hahaha
  • e

    eidam | SuperSaaS

    04/04/2021, 6:53 PM
    And there are no stupid questions, ask before you get angry with Workers! ๐Ÿ™‚
  • j

    jmshal

    04/04/2021, 6:54 PM
    It was more directed at myself. I'm doing a hackathon with my partner, so I felt I wasted a bunch of precious time.
  • j

    jmshal

    04/04/2021, 6:56 PM
    That kinda raises a different question lol. If the DO class name is unique across all workers, how are multiple environments meant to work? Eg. I can't re-use "VisionBoard" across my development and production envs.
  • j

    jmshal

    04/04/2021, 6:59 PM
    Oh I guess it just works ๐Ÿช„
  • j

    jmshal

    04/04/2021, 6:59 PM
    Sorry, please ignore that question ๐Ÿ˜‚
  • j

    jmshal

    04/04/2021, 6:59 PM
    I'm gonna shut up now, you peeps are amazing.
  • s

    Subh

    04/05/2021, 2:19 AM
    is it possible to get a callback on DO writes? The reason I am asking is, it would be super easy to do more complex thing in the background, if you have the data what you need. Example, multiple data updates on one write.
  • s

    sepbot

    04/05/2021, 9:58 AM
    i think if a websocket connection drops off without sending any messages to DO (but did receive messages from DO), then the close/error event never gets fired.
  • e

    eidam | SuperSaaS

    04/05/2021, 1:30 PM
    Some storage ops are failing, started ~40 minutes ago Seems to affect only couple of DOs, perhaps issues in some of the DOs colo
    Copy code
    Internal error in DurableObjectStorage list() operation.
  • g

    Greg-McKeon

    04/05/2021, 4:13 PM
    Hey, are you still seeing this?
  • e

    eidam | SuperSaaS

    04/05/2021, 4:13 PM
    Yep, still happening, do you want some more info? There are also some "internal errors", no details though (this was resolved in DM already, thank you!)
  • k

    Kevin W - Itty

    04/05/2021, 7:21 PM
    Happy to report itty-router has zero issues with ES module syntax in CF ๐Ÿ™‚
  • j

    joe

    04/05/2021, 7:21 PM
    niiiiiice
  • k

    Kevin W - Itty

    04/05/2021, 9:37 PM
    Anyone running into the issue that
    new Date
    inside a Durable Object gives
    1970-01-01T00:00:00.000Z
    ? No such issue in a Worker...
  • b

    brett

    04/05/2021, 9:40 PM
    I just updated my DO to return the date and it looks correct to me
  • b

    brett

    04/05/2021, 9:40 PM
    Any more context?
  • e

    eidam | SuperSaaS

    04/05/2021, 9:43 PM
    I would say it will be similar to Workers - Date executed at the global scope always return zero
  • k

    Kevin W - Itty

    04/05/2021, 9:49 PM
    weird... i'm executing within the constructor
  • k

    Kevin W - Itty

    04/05/2021, 9:50 PM
  • k

    Kevin W - Itty

    04/05/2021, 9:51 PM
    maybe it's a prob with serialization on the storage.put?
  • b

    brett

    04/05/2021, 9:52 PM
    No, that serialization should work. The constructor is probably (effectively) global scope for now, the instance is created and then requests are fed into it.
1...484950...567Latest