Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Price while offline and price while online #757

Open
eazypaulCode opened this issue Mar 4, 2023 · 12 comments
Open

[Feature] Price while offline and price while online #757

eazypaulCode opened this issue Mar 4, 2023 · 12 comments
Labels
Feature Adding a new feature, or substantial improvements on existing functionality Low Priority Can wait, not urgent. Handle when possible

Comments

@eazypaulCode
Copy link

Feature Description

So you can add for example a price of 10 credits per hour while the product is running and only 5 if it is offline

Solution Idea

As an input field within the product so you can change the price while running or offline

Additional Info

No response

@eazypaulCode eazypaulCode added the Feature Adding a new feature, or substantial improvements on existing functionality label Mar 4, 2023
@IceToast IceToast added the Low Priority Can wait, not urgent. Handle when possible label Mar 18, 2023
@IceToast
Copy link
Collaborator

Since pterodactyl does not offer webhook (or any other form of event notification) for server status changes this would require to request the server states for every server individually in a rather high frequency. That will inevitably cause a high load on your database (depending on the number of servers).

For reference:
You can only fetch the server state by using the client route /resources for a single server

Personal opinion:
I dislike the idea a little bit, since just turning a pterodactyl server offline won't free up any resources allocated by pterodactyl. That means the theoretical ram usage is still blocked. ´

@1day2die What do you think?

@GeckoBoy84 GeckoBoy84 moved this to 📋 Backlog in CPGG Roadmap May 12, 2023
@BasToTheMax
Copy link

Yes. Please add this!
Pterodactyl has an activity api now.

@BasToTheMax
Copy link

You could check the server status every 5 minutes.

@BasToTheMax
Copy link

You could also listen for console messages (using websockets) for the stop message.

@1day2die
Copy link
Collaborator

Since pterodactyl does not offer webhook (or any other form of event notification) for server status changes this would require to request the server states for every server individually in a rather high frequency. That will inevitably cause a high load on your database (depending on the number of servers).

For reference: You can only fetch the server state by using the client route /resources for a single server

Personal opinion: I dislike the idea a little bit, since just turning a pterodactyl server offline won't free up any resources allocated by pterodactyl. That means the theoretical ram usage is still blocked. ´

@1day2die What do you think?

the only concern i have is the frequent API requests. this could lead to heavy load or a request-limit reaching on ptero. doing the calls async couldwork however.

To your personal opinion: if hosts would like to do that, i couldnt care less^^ its their ressources

@BasToTheMax
Copy link

the only concern i have is the frequent API requests. this could lead to heavy load or a request-limit reaching on ptero. doing the calls async couldwork however.

I don't think an api request takes a lot of resources. The only problem is rate limits, I think.

@1day2die
Copy link
Collaborator

one request dosent. 1000 at a time do

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in CPGG Roadmap May 24, 2023
@1day2die 1day2die reopened this May 24, 2023
@1day2die 1day2die moved this from ✅ Done to 📋 Backlog in CPGG Roadmap May 24, 2023
@AGuyNamedJens
Copy link
Collaborator

the only concern i have is the frequent API requests. this could lead to heavy load or a request-limit reaching on ptero. doing the calls async couldwork however.

I don't think an api request takes a lot of resources. The only problem is rate limits, I think.

If you only have 5 servers it wouldn't be an issue no, but what about 100 customers with ~180 servers, that would already be a massive difference (for small hosts it obviously won't be an issue)

@BasToTheMax
Copy link

BasToTheMax commented May 24, 2023

Can't you send the api request directly to wings instead via the panel?

You are correct, yes, but spreading out the status checks would decrease the load. You could get the status of 5 servers every minute, instead of getting the status of all servers at once.

@sybetjeh sybetjeh mentioned this issue Apr 3, 2024
@S0ly
Copy link
Member

S0ly commented Apr 3, 2024

any news on this feature I would be interested too since pterodactyl could handle that ? thanks

@MrWeez
Copy link
Collaborator

MrWeez commented May 22, 2024

It would be convenient if pterodactyl would allow you to get the status of all servers with a single request. In this case, we could already select the necessary values from the response on the cpgg side.

@MrWeez
Copy link
Collaborator

MrWeez commented May 22, 2024

This would eliminate the problem that we have to make several hundred requests at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Adding a new feature, or substantial improvements on existing functionality Low Priority Can wait, not urgent. Handle when possible
Projects
Status: 📋 Backlog
Development

No branches or pull requests

7 participants