Making `flyctl scale` blocking?

I host a web backend on Fly, and currently use a GHA job to perform nightly data ingests.

Because only the ingest job is RAM/resource hungry but “normal” traffic is not, it’s nice to bump resources with flyctl scale during the ingest only, then scale back down afterwards.

The problem seems to be, flyctl scale works in an async manner, such that immediately subsequently calling flyctl monitor won’t work - it must be at precisely the right time. If I call flyctl monitor too soon or too late, it fails.

Goal is to find a more reliable solution, something other then sleep to avoid timing risk with chaining these commands.

What might be some alternative ways to scale a Fly VM (including raw HTTP calls if needed) I should consider?

Thank you

1 Like

Sounds like you should file a GitHub issue for it: Issues · superfly/flyctl · GitHub

Machines (Apps v2) have leases and waits afaik, that might help you achieve this (docs).

Machines don’t yet support flyctl scale, but the equivalent is flyctl machine clone <from-this-machine> -r <region> -a app

Announcement: Fly Apps on machine prerelease

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.