repoRust.ServerManagercancel

89 Commits over 425 Days - 0.01cph!

24 Days Ago
Increase Rcon timeout period by responseDelaySeconds so we give more time to any intensive commands
24 Days Ago
Try waiting 30 seconds after server start to generate/upload map png (too much is going on at server start for this intensive command)
25 Days Ago
Use 0.5 scale so it renders faster
25 Days Ago
Let world.rendermap have 30 seconds so we can guarantee we get the right command response
25 Days Ago
compile error fix
25 Days Ago
Pass optional responseDelaySeconds arg when running rcon commands to wait longer for intensive commands, like world.rendermap
26 Days Ago
Truncate log lines >512 chars, increase max batch size from 50 to 500 to reduce request count
26 Days Ago
Stop logging exception stack traces, we can get them from sentry instead
27 Days Ago
Probably fix rcon client only returning the first response from the server
31 Days Ago
Revert previous whitespace changes as they break authentication. We're better off handling this on the API side
33 Days Ago
Replace whitespace in the SM key with underscores
34 Days Ago
▌▋▆ ▇▅▄▅ ▋█ ▉▄▇▇▅ ▇▊▊▋▅▇.▆▇█▉▄▌▉▊█▋▉ ▍▊▆ █▆▋ ▍▄█▌▇ ▆▌▊▋ ▄▊▌▇█▌▌▍▉▉▇▋ ▇▇▉█▆ ▊▄▄▊▄.▊▄▍▋▋▊▉▍▅ ! ▉▍▇▌▌▌▄▇▋.▄▊▊▍▌▍ -> ▊▊▍█.▄▉▌▉▄▍ ! ▄▋█▊▄ ▅█▊█▋▌▍█▊▊▅▇▇▄▄█▊▆▍▄▄▋▄▍▉▋▇ ▆▍▌▄▊▊▊▌▅▄ ▉▄▅ ▊▆▆ ▌▍ ▅▉▉▄▉ ▇▉▉▊▍▇▇ ▋▌▄ █▊█▋▉█▋▊ ▅▌▇ ▅▅▋ ▇▌▉▆▍▇▅ ▌▆ █▉▉▄ ▄▋▉▌▇▋ ▄▊▍/▋█▆██▍ ▇▅▅▆█▋▆ ▄▌▄ ▋ █▌▊ █▄▆▄▇▊▌▊, ▄▄ ▇▅, ▅█▄▄▄ ▉▌▆█ ▅▇▇ ▅▇▋▊ ▋▋▊ ▆▅▄▉▋▆▆▄▌▄▋▄ ▅▌▆▊▌ ▄▋ ▄▆▉▉▅▆▋▍▍▄▍▅▍▇█▄▍▄▌.▇▋▋█▄▅▋▄▅█▌▋▍▊▍ ▊▇▋▉▌▇ ▍▇▇ ▍▌▌▌▋ ▋▋ ▆▉▍▊▄.▇▋▉▇█▅▉█▄.▇▍▉ ▍▊▄ ▇█▆ ▉▇█▇█▆▇▌▇ █▋▉ ▅▍▍▌▇▊▆▅ █▅█ ▍▆▊ ▌▇▌▄▋▇ ▌▇ █▆▉ ▍▆▆ ▄▉▌▄▊▉▅ ▄▉▅▇▇▅▆▌█▍▉▅▌▇ ▄▄▆▋▇▊▌▉ ▊▇█ ▇▍▄ ▌▆▇ ▆▋█ ▌▋ ▋▊ ▇▅▉█ ▄▇▄▌█▍▄ ▉▉▇▇▌ ▇▉▍ ▋▍▄▆▆▍▅▊ ▇▇▇█▆▆. ▉█▅ ▅ ▇█▇▇ ▉▌▍▄▆ ▊▍▌▌▄▇ ▌▍▋▆▍ (▇▉▍▊ ▊█). ▄█▋ ▇▄▍▅▋▄▄▉█▇▅▇ ▆▋█▊█▉▆ ▅█▆▌▅▆▌▌. ▉▊▊▅▋█ ▆▍▊▄▊ ▅▄ ▆▆▉▇▄▊▅▋█▄ ▆▍ ▌▇ ▆▄▅ ▋▍▌▅▉▌ ▌▅█ ▌▍▋▋ ▉▌▇▅ ▌▆'▋█ ▄▊▋▄. ▄▊█▆ ▍▄▍▌▉▇▋▇▍ ▋▇ ▋▆▊▋▅▍, ▋██ ▉▊█▄. ▇▋▊▇▅ ▅█▆▇▍ █▋▄ ▍▆ ▆▄▄▆▅▌▍▆.█▌▉▄▇▅▄▊ ▇▊▌▉▋▊▇▅ ▋▇▅ ▇▆▅▍▅▄█.▅▇▉▇▇▆▇▉▆█▉▄▄▄▇▆ ▅▅▅▇█▊▋ ▌▉▋ ▊▊▍▆▍█▍ ▍▄▋▅▍ ▆▊▆▆▇▌▉ ▊▆▄▄▄▄▋ ▄▊ ▍█▉▊▌▉ ▉▋▉ ▄▉▅ ▄▅▄ ▉▄▆▍ █▅ ▅▇▌▇▌█▊ ▉▌▅▅█▆ - ▍▉▅█ ▅▊▄▉ ▋▇▇█▊▅▍█ ▍▌▌▉ ▉▋▅▋▇▄▅▍▅ ▊▌ █▊▋ ▅▉█ ▊▅▆█▊█▍▉▍▆▇▊▅▌▇▆▍▋▅▇▇▅▄▉ ▅▇▄█▌ ▋▌▄▇▄▇▋ ▉▅▍▇▅▆ "▇▌▌▆▄▌█▅ ▋▄▍▆ ▄█▄▋▆▆█▉▊ ▆▇ ▆▇▅ ▉▊▊ ▌▌▌▅▅▋▆▋▍▇▆▄▊▍▋▄▅▍▌▊▋▌▊▌" ▊▉▅█ ▉▍▍▆▌█▍ ▅▅▅▌▋▌ ▄▇▌▆▉▍▆▊▆▆▅▊▄▍▍▆▄█▉▉▋▅▍█▍▅▅▍▉▍▍▄▅▌▋█▋▊▅▊. ▌▌▇▋▋▊ ▋▉▍▍▅▊▆▅ ▄▌▇█ ▇▇▋▆▄ ▇▆ ▄█▆▅▉██▇▍▊▍▌▆▊▆█▉ ▄▊▌▇▋ ▄▋▌▄ ▇▆▌▌▊▋▄ #▉▊ ▅▉██ ▉▊▇▇█▅▄▅▋/▄▍▅▆██_▍▇█_█▇█ ▄▅█▅▄▅ ▌▋▄ ▄▌▅ ▊▄ ▅▍█▉▉.▌▍▊▆▍▊▇▇▉.▊▇▋
34 Days Ago
remove unneeded 5min delay on TryUploadMapImage
34 Days Ago
Revert "Simplify file uploading to not use MultipartFormDataContent" This reverts commit b0c590aaca7163ea0b4ffe6a0b1d4eb46b2d2e50.
53 Days Ago
rogue newline
53 Days Ago
Simplify file uploading to not use MultipartFormDataContent
53 Days Ago
Attempt to delete the map png file if loading failed - edge case
53 Days Ago
rogue newline
53 Days Ago
Use Timeout.InfiniteTimeSpan instead for clarity
53 Days Ago
Maker timer run at TimeSpan.MaxValue interval
55 Days Ago
Fix endpoint naming. Run 5 mins after server start (from 10). Fix MemoryStream getting disposed. Change scope of filestream so we can delete the file when we're done. Read responses as string, not json.
55 Days Ago
Change to use new renamed mapImageExists endpoint and log the url if it does already exist
56 Days Ago
Upload map image to files.facepunch.com via the publicapi and retrieve the url
56 Days Ago
Use cancellation token in HttpResponseMessage.EnsureSucessful
56 Days Ago
new todo
56 Days Ago
ask the backend if this server key/wipeid already has a map uploaded, if so, early exit
57 Days Ago
minor changes and comments
2 Months Ago
Make sure tasks are canceled when exiting Run()
3 Months Ago
▅▅▍▉█ ▌▌▆█▉█▊▌▉▌▉▆▅█▅▇▋▉▊▉▌▊▇▊█▍▇ ▉▅▍█▊▌█▄▆▄ ▌█▄ ▉▌▊ ▌▆
3 Months Ago
▊▆▍▍▄▆█▋▄.█▅▆▋▍▋ -> ▊▍▇▇.▄▍▄▄▉▆
3 Months Ago
▍▄▇ ▍█▋▍ ▊▊ ▅▉███ ▅▅▆▍▉▅.▆▅▆▌█▌▄▅▄█▉ ▆▅▇ ▅▅▍ ▋▅███ ▄▍▋▆ ▆▅▌▅▇▉▉▉▆▌▋▉ █▉▋▌▊ ▅▉▇▆▅.▆▄▆▉▌▄▋▋▄
4 Months Ago
Bugfix: reset stream position after copying data - Backups was using a stream with a cursor at the end, so it was sending 0-length content Tests: ran in test env, was able to download non-empty files Merge pull request #8 from Facepunch/FixEmptyBackups Bugfix: Send full backup files
4 Months Ago
Bugfix: reset stream position after copying data - Backups was using a stream with a cursor at the end, so it was sending 0-length content Tests: ran in test env, was able to download non-empty files
4 Months Ago
New: support xml-style errors from API Allows to see more details about what's going wrong with the request(Azure SAS errors are xml) Tests: got the SAS error locally, saw the logs in ServerManager Bugfix: don't use a closed stream when retrying backup uploading If we fail the upload at the point of consuming the stream (so passed backupBegin), it will close the stream and fall over on Position call, making retries useless. Tests: when running own server it was erroring out on retries with stream closed exception - not anymore. Bugfix: Don't wait after last upload retry Tests: Saw the uploads fail, didn't see the log after last attempt. Update: renamed file back to BackupData I shouldn't have renamed it in the first place. Clean: removing obsolete property Tests: local run was able to upload files Bugfix: respect the cancellation token when fetching a response of request Update: limit how much time upload routine can take - also add extra logging around processGuard semaphore Tests: tested the entire flow by triggering 5 snapshots Bugfix: use the right token for some async ops Bugfix: avoid unlockign semaphore from the wrong thread If it would time out during the wait period, it would release the semaphore in finally, leading to break of unique ownership promise Clean: remove ITask inheritance from UploadPerfSnapshot It used to be a task at the start, but not anymore Update: review feedback - dispose of the nested CTS for perf snapshot uploads - Use async copy when creating an extra stream to send backup files Tests: full local server flow + 2 snapshot uploads Merge pull request #7 from Facepunch/DebugImprovements Minor fixes and more verbose HTTP errors
4 Months Ago
WIP restart server at 4am local machine time, check for >=22 hour server uptime and do not restart Staging servers (env || hostname) start the timer 10 minutes after the server is up and repeat every 5 minutes Separate rcon logic and serverinfo loop out of ConsoleInputBar and into separate class CommandManager. Swapped out usages in RunServer.cs. Finished up the CheckForServerRestart functionality. Confirmed the project still builds Was accidentally using DateTime.UtcNow instead of DateTime.Now Change the time check to prevent the extremely rare edgecase of the server attempting to restart twice Use the global cancellation token in the CommandManager, don't make a new one CommandManager takes CancellationToken, not source Rename CommandManager to more suitable ServerRcon rename vars, too Double time window to ensure we restart and store DateTimeOffset of when restart was last requested Attempt to restart multiple times if we failed due to an exception Log any errors Minor changes Merge pull request #6 from Facepunch/server_restarts Server restarts
4 Months Ago
Minor changes
4 Months Ago
Log any errors
4 Months Ago
Attempt to restart multiple times if we failed due to an exception
4 Months Ago
Double time window to ensure we restart and store DateTimeOffset of when restart was last requested
4 Months Ago
rename vars, too
4 Months Ago
Rename CommandManager to more suitable ServerRcon
4 Months Ago
Update: review feedback - dispose of the nested CTS for perf snapshot uploads - Use async copy when creating an extra stream to send backup files Tests: full local server flow + 2 snapshot uploads
4 Months Ago
Bugfix: avoid unlockign semaphore from the wrong thread If it would time out during the wait period, it would release the semaphore in finally, leading to break of unique ownership promise Clean: remove ITask inheritance from UploadPerfSnapshot It used to be a task at the start, but not anymore
4 Months Ago
CommandManager takes CancellationToken, not source
4 Months Ago
Was accidentally using DateTime.UtcNow instead of DateTime.Now Change the time check to prevent the extremely rare edgecase of the server attempting to restart twice Use the global cancellation token in the CommandManager, don't make a new one
4 Months Ago
Bugfix: use the right token for some async ops
4 Months Ago
Update: limit how much time upload routine can take - also add extra logging around processGuard semaphore Tests: tested the entire flow by triggering 5 snapshots
4 Months Ago
Bugfix: respect the cancellation token when fetching a response of request
4 Months Ago
New: support xml-style errors from API Allows to see more details about what's going wrong with the request(Azure SAS errors are xml) Tests: got the SAS error locally, saw the logs in ServerManager Bugfix: don't use a closed stream when retrying backup uploading If we fail the upload at the point of consuming the stream (so passed backupBegin), it will close the stream and fall over on Position call, making retries useless. Tests: when running own server it was erroring out on retries with stream closed exception - not anymore. Bugfix: Don't wait after last upload retry Tests: Saw the uploads fail, didn't see the log after last attempt. Update: renamed file back to BackupData I shouldn't have renamed it in the first place. Clean: removing obsolete property Tests: local run was able to upload files
4 Months Ago
Separate rcon logic and serverinfo loop out of ConsoleInputBar and into separate class CommandManager. Swapped out usages in RunServer.cs. Finished up the CheckForServerRestart functionality. Confirmed the project still builds