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

    AA

    05/17/2023, 2:30 AM
    are there any conventions for setting up workers and naming routes for production and staging/dev?
  • a

    AA

    05/17/2023, 2:33 AM
    super curious how to do secrets in those cases as well
  • d

    dave

    05/17/2023, 2:33 AM
    this is the naming convention we use as an example: 1.
    paddle-webhook-worker-dev
    for local dev, should never be pushed to Cloudflare 2.
    paddle-webhook-worker-staging
    for staging (online) 3.
    paddle-webhook-worker
    for production
  • a

    AA

    05/17/2023, 2:34 AM
    same wrangler file for them all?
  • d

    dave

    05/17/2023, 2:34 AM
    yes, but different sections
  • a

    AA

    05/17/2023, 2:34 AM
    and how about secrets?
  • d

    dave

    05/17/2023, 2:35 AM
    different again, but manually set them with
    wrangler secret put -e staging MY_SECRET
    and
    wrangler secret put -e production MY_SECRET
  • a

    AA

    05/17/2023, 2:36 AM
    oh you can do -e for secrets.. i see
  • a

    AA

    05/17/2023, 2:36 AM
    i saw this binding this i thought i might have to use
  • d

    dave

    05/17/2023, 2:36 AM
    for dev, we usually hardcode secrets as plaintext, since they do not have access to any data/code/etc that is actually secret.
  • a

    AA

    05/17/2023, 2:37 AM
    ah i see.. https://developers.cloudflare.com/workers/wrangler/commands/#put-3
  • a

    AA

    05/17/2023, 2:40 AM
    @dave thanks 😄
  • z

    zizi

    05/17/2023, 2:40 AM
    hi all, does this limit is for one worker request or one worker instance. https://developers.cloudflare.com/workers/platform/limits/#simultaneous-open-connections
  • d

    dave

    05/17/2023, 2:41 AM
    @AA you should really use
    .dev.vars
    for local dev secrets
  • a

    AA

    05/17/2023, 2:41 AM
    yea thats what i'm thinking
  • a

    AA

    05/17/2023, 2:41 AM
    This is webhook testing so local dev is of limited use
  • a

    AA

    05/17/2023, 2:41 AM
    really need a staging and prod
  • b

    bulk88

    05/17/2023, 3:08 AM
    What is the CPU speed of a CF worker? Lets say for computing PI or JSON.parse() 3 layers deep of nested JSON, Would it be faster to do the same math or string parsing, in the 10 ms of a Worker's CPU quota, or the UA Desktop or Android?
  • b

    bulk88

    05/17/2023, 3:09 AM
    over the wire data size, is identical, but, what has more MIPS, a CFW or a 2020s or late 2010s 2-3 ghz ARM Android phone?
  • w

    Walshy | Pages

    05/17/2023, 3:10 AM
    Errr what
  • w

    Walshy | Pages

    05/17/2023, 3:11 AM
    Our hardware varies by generation but much newer than 2010
  • w

    Walshy | Pages

    05/17/2023, 3:12 AM
    Obviously the code runs in an isolate though with a lot of other stuff. So, it's not exactly gonna just cap the CPU but yeah.
  • a

    AA

    05/17/2023, 3:25 AM
    are you trying to decide if you wanna run a workload on the user device or a cf worker?
  • b

    bulk88

    05/17/2023, 3:42 AM
    correct, string searches, replace regexes, index of, JSON parse, etc,
  • m

    mountainash

    05/17/2023, 5:09 AM
    Smart Placement CSS z-index bug in the Demo makes the lower locations not selectable. Also the blog post doesn’t say anything about “the more number of requests the Worker fetches, the slower it may seem”. The demo should also mention the number of requests as this is part of the multiplication factor.

    https://cdn.discordapp.com/attachments/779390076219686943/1108260064592150528/IMG_3869.png▾

  • n

    Neiki

    05/17/2023, 11:59 AM
    hey my cron trigger (every 10minutes) randomly executed twice 🤔 is that normal?

    https://cdn.discordapp.com/attachments/779390076219686943/1108363176195670078/image.png▾

    https://cdn.discordapp.com/attachments/779390076219686943/1108363176485068961/image.png▾

  • n

    Neiki

    05/17/2023, 12:00 PM
    but just once now its working as it seems normal
  • s

    sathoro

    05/17/2023, 2:07 PM
    it's at least once guaranteed right? twice is more than once
  • l

    Luisdanielbarros

    05/17/2023, 2:45 PM
    Hi, I'm facing a problem and would appreciate any help I cannot run the command wrangler dev, this is the output I receive:

    https://cdn.discordapp.com/attachments/779390076219686943/1108404936213016786/Printscreen_1.png▾

  • b

    boywithkeyboard

    05/17/2023, 2:50 PM
    will tcp connections for workers drop this week?
1...247024712472...2509Latest