summaryrefslogtreecommitdiffstats
path: root/modules/graceful
Commit message (Collapse)AuthorAgeFilesLines
* Fix windows build error (#14263)Lunny Xiao2021-01-061-2/+4
| | | | | | | | | | | * fix build * take flash error message back and fix more windows lint error * performance optimization * own step to check lint for windows Co-authored-by: 6543 <6543@obermui.de>
* Move install pages out of main macaron routes (#13195)zeripath2020-10-192-2/+2
| | | | | | | | | | | | | * Move install pages out of main macaron loop Signed-off-by: Andrew Thornton <art27@cantab.net> * Update templates/post-install.tmpl Co-authored-by: Lauris BH <lauris@nix.lv> * remove prefetch Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set TLS minimum version to 1.2 (#12689)zeripath2020-09-021-0/+2
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Re-attempt to delete temporary upload if the file is locked by another ↵zeripath2020-08-111-1/+2
| | | | | | | | | | | process (#12447) Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util. Fix #12339 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777)zeripath2020-07-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | * Make LogDescriptions race safe * Add manager commands for pausing, resuming, adding and removing loggers Signed-off-by: Andrew Thornton <art27@cantab.net> * Placate lint * Ensure that file logger is run! * Add support for smtp and conn Signed-off-by: Andrew Thornton <art27@cantab.net> * Add release-and-reopen Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Handle panics that percolate up to the graceful module (#11291)zeripath2020-05-141-1/+34
| | | | | | | | | | | | | | | | | | * Handle panics in graceful goroutines Adds a some deferred functions to handle panics in graceful goroutines Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle panic in webhook.Deliver Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle panic in mirror.syncMirror Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Prevent panic during wrappedConn close at hammertime (#11219)zeripath2020-04-261-0/+11
| | | | | | | | | | | * Prevent panic during wrappedConn close at hammertime Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/graceful/server.go * Fix extraneous debug in goldmark.go Signed-off-by: Andrew Thornton <art27@cantab.net>
* Restore graceful restart on SIGHUP (#10224)zeripath2020-02-111-2/+2
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Prevent double waitgroup decrement (#10170)zeripath2020-02-071-3/+7
| | | | * Prevent double waitgroup decrement
* [UI] Show pull icon on pull (#10061)65432020-01-291-1/+1
| | | | | * make fmt * show pull icon on pull
* Queue: Make WorkerPools and Queues flushable (#10001)zeripath2020-01-282-20/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make WorkerPools and Queues flushable Adds Flush methods to Queues and the WorkerPool Further abstracts the WorkerPool Adds a final step to Flush the queues in the defer from PrintCurrentTest Fixes an issue with Settings inheritance in queues Signed-off-by: Andrew Thornton <art27@cantab.net> * Change to for loop * Add IsEmpty and begin just making the queues composed WorkerPools * subsume workerpool into the queues and create a flushable interface * Add manager command * Move flushall to queue.Manager and add to testlogger * As per @guillep2k * as per @guillep2k * Just make queues all implement flushable and clean up the wrapped queue flushes * cope with no timeout Co-authored-by: Lauris BH <lauris@nix.lv>
* Make CertFile and KeyFile relative to CustomPath (#9868)zeripath2020-01-191-2/+16
| | | | | | | | | | | | | | | | * Make CertFile and KeyFile relative to CustomPath The current code will absolute CertFile and KeyFile against the current working directory. This is quite unexpected for users. This code makes relative paths absolute against the CustomPath. Fix #4196 * Improve error reporting when reading certificates * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix missed change to GetManager() (#9361)zeripath2019-12-151-1/+1
|
* Graceful: Xorm, RepoIndexer, Cron and Others (#9282)zeripath2019-12-158-95/+143
| | | | | | | | | | | | * Change graceful to use a singleton obtained through GetManager instead of a global. * Graceful: Make TestPullRequests shutdownable * Graceful: Make the cron tasks graceful * Graceful: AddTestPullRequest run in graceful ctx * Graceful: SyncMirrors shutdown * Graceful: SetDefaultContext for Xorm to be HammerContext * Avoid starting graceful for migrate commands and checkout * Graceful: DeliverHooks now can be shutdown * Fix multiple syncing errors in modules/sync/UniqueQueue & Make UniqueQueue closable * Begin the process of making the repo indexer shutdown gracefully
* Add comment to exported function WindowsServiceName (make revive) (#9241)David Svantesson2019-12-031-0/+1
|
* Graceful: Cancel Process on monitor pages & HammerTime (#9213)zeripath2019-11-304-46/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Graceful: Create callbacks to with contexts * Graceful: Say when Gitea is completely finished * Graceful: Git and Process within HammerTime Force all git commands to terminate at HammerTime Force all process commands to terminate at HammerTime Move almost all git processes to run as git Commands * Graceful: Always Hammer after Shutdown * ProcessManager: Add cancel functionality * Fix tests * Make sure that process.Manager.Kill() cancels * Make threadsafe access to Processes and remove own unused Kill * Remove cmd from the process manager as it is no longer used * the default context is the correct context * get rid of double till
* Graceful: Allow graceful restart for unix sockets (#9113)zeripath2019-11-242-1/+19
| | | | Previously we could not handle graceful restarts for http over unix sockets. These can now be handled.
* Run make fmt on master (#9129)David Svantesson2019-11-221-5/+4
|
* Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)zeripath2019-11-2112-281/+550
| | | | | | | | | | | | | | | | | | * Graceful Shutdown for windows and others Restructures modules/graceful, adding shutdown for windows, removing and replacing the old minwinsvc code. Creates a new waitGroup - terminate which allows for goroutines to finish up after the shutdown of the servers. Shutdown and terminate hooks are added for goroutines. * Remove unused functions - these can be added in a different PR * Add startup timeout functionality * Document STARTUP_TIMEOUT
* Graceful fixes (#8645)zeripath2019-10-234-7/+33
| | | | | | | | | | * Only attempt to kill parent once * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add waitgroup for running servers
* Restrict modules/graceful to non-windows build and shim the IsChild marker ↵zeripath2019-10-168-0/+25
| | | | (#8537)
* Restore Graceful Restarting & Socket Activation (#7274)zeripath2019-10-157-0/+838
* Prevent deadlock in indexer initialisation during graceful restart * Move from gracehttp to our own service to add graceful ssh * Add timeout for start of indexers and make hammer time configurable * Fix issue with re-initialization in indexer during tests * move the code to detect use of closed to graceful * Handle logs gracefully - add a pid suffix just before restart * Move to using a cond and a holder for indexers * use time.Since * Add some comments and attribution * update modules.txt * Use zero to disable timeout * Move RestartProcess to its own file * Add cleanup routine