Can I force my project to go to sleep?

I am setting something up and I need to test that it actually works even if my project has to wake up from sleep. Is there any way to force my project to sleep to check if it still works? I know I can wait 5 min but I was hoping I could do it without waiting every time I need to test

Thanks

1 Like

Hey @bit you can call

curl --request POST \
  --url https://api.glitch.com/projects/$PROJECT_ID/stop \
  --header 'authorization: $YOUR_TOKEN' \
  --header 'content-type: application/json'

You can find $YOUR_TOKEN by running JSON.parse(window.localStorage.cachedUser).persistentToken in the browser console for an Editor window for your project. Your $PROJECT_ID should also be displayed there.

Let me know if you need more information about any of that - I’d be happy to explain further.

7 Likes

makes big red button to turn off all projects in case of max running projects exceeded gets hit

1 Like

When a glitch regular does the very thing glitch regulars hate which is bumping old posts.

2 Likes

Sorry @javaarchive, time to go to forum jail.

3 Likes

How long should he serve in jail? NaN (infinity) ?

1 Like

Ya I think that works.

2 Likes

@javaarchive, It’s time to serve NaN in jail unless you pay $NaN to NaN people!

1 Like

Y’all gonna go to forum jail for going off-topic :joy:. By the way, I will add that feature to my chrome extension, it should be useful. Thanks Cori for answering it :upside_down_face:.

3 Likes