Commit Graph

49 Commits

Author SHA1 Message Date
Ruud 7cc55c21b6 Shutdown cleanly on quit process 2013-01-22 23:43:15 +01:00
Ruud c4adab69cb Just use basename of __file__ when restarting. fix #982 2012-10-29 16:32:35 +01:00
mano3m 64c044acc1 Shutdown the logger before restarting CPS. Fixes issue #587 2012-07-15 19:09:48 +02:00
Ruud c274867571 Use settings datadir again. fix #518 2012-07-01 00:43:34 +02:00
bwq 001dfb9245 Added data_dir option to use a custom data_dir 2012-06-23 20:28:04 +02:00
Ruud f8bae9e84e Don't remove pidfile twice 2012-05-20 13:15:55 +02:00
Ruud ba4a38b604 Allow select error to ctrl+c app when not in develop mode 2012-05-07 20:52:03 +02:00
Ruud 4ae91fa17a Just print error when loader didn't finish 2012-04-19 22:18:10 +02:00
Michael J. Cohen ee4e91d318 Default exception handler no longer assumes all remaining exceptions take (errno, string) pairs.
Previously any exception that made it all the way up to the default
exception handler would be expected to take (errno, string) pairs,
as is the python standard for exceptions thrown by system calls.
All exceptions that don't take enough arguments throw a ValueError.

Based on the errno tested, it appears that this code
is meant to silently ignore when a socket receives a SIGINT (from
e.g. a timeout.)  This seems to be the only instance where handling
EINTR in this manner is desired - though having this bubble up this
far seems odd.

The existing code would also handle any other EINTR, though, which
includes those raised by OSError, WindowsError, and
anything that subclasses EnvironmentError, barring KeyboardError
because it is handled separately.  This is a bug as there is already
some use of the signals module elsewhere in CouchPotato.py to trap
SIGINT and SIGTERM outside of system calls, and most of these other
EINTRs should be handled by code lower down the stack.

A default exception handler is also added, so that unhandled
exceptions will be logged, and raised.
2012-04-03 19:34:21 -04:00
Ruud 088dc5386c Better shutdown of process 2012-03-10 17:07:19 +01:00
Ruud d0aca61165 Try and stop running daemon first 2012-03-06 07:55:30 +01:00
Ruud adc755dbd5 Move config parse to runner 2012-02-17 18:00:25 +01:00
Ruud 5d70369df1 More runner fixes 2012-02-17 17:35:32 +01:00
Ruud 756bffdb62 Don't show error at all? 2012-02-17 11:55:50 +01:00
Ruud 456b44e80f Catch final log 2012-02-16 21:31:10 +01:00
Ruud af92355e2f JSON errors and image not loading 2012-02-16 00:01:43 +01:00
Ruud 0fe18b0109 Reloader stopped working 2012-02-15 22:17:31 +01:00
Ruud e1f6354b34 Cleanup 2012-02-15 21:28:44 +01:00
Ruud a6e1386584 Better logging in runner script 2012-02-15 21:18:41 +01:00
Ruud b50647885f More runner optimisations 2012-02-14 23:45:29 +01:00
Ruud 8a0130c9a6 Remove pidfile before restarting 2012-02-14 23:00:13 +01:00
Ruud 4e2b511c06 Optimized runner script 2012-02-12 17:59:44 +01:00
Ruud a42ff5e038 Simpler loader script 2012-02-12 14:23:16 +01:00
Ruud 55cb53b34d Do proper shutdown 2012-01-31 01:00:54 +01:00
Ruud 4bf430a32e Don't fire atexit when developing 2012-01-28 12:32:27 +01:00
Ruud a848a18d37 Cleanup on terminate 2012-01-27 21:19:00 +01:00
Ruud 5882f251de Monitor parent process for shutdown 2012-01-27 15:28:31 +01:00
Ruud d38ff40b54 Daemonize fix 2012-01-27 11:29:24 +01:00
Ruud 3ad0f91dc4 Daemonize and pid_file support 2012-01-15 02:03:30 +01:00
Ruud 199c17e2c1 Better shutdown and restart 2012-01-14 20:55:23 +01:00
Ruud 478e729e73 Revert "Merge branch 'refs/heads/develop'"
This reverts commit 03a414c601, reversing
changes made to de4e47b4a4.
2012-01-14 11:58:40 +01:00
Ruud f70767be28 py2app fixes 2012-01-14 00:21:10 +01:00
Ruud 1fb2e2947e Remove daemon for now 2012-01-08 21:38:50 +01:00
Ruud 044a23764d End plugins before shutdown 2012-01-07 22:57:53 +01:00
Ruud 1effeb2134 Updater
Event priority
Mootools defaults fixes
2011-09-12 21:26:38 +02:00
Ruud 5b3f6adae0 Make config file a start parameter 2011-08-31 16:10:12 +02:00
Ruud 9ff4d0bc91 Proper loading of plugins on debug
Restarting functions
2011-08-29 18:07:19 +02:00
Ruud 322762d702 Searcher, settings styling 2011-03-06 03:01:31 +01:00
Ruud f1b9376d5f argparse is lame! 2011-02-13 13:22:36 +01:00
Ruud 38a9ae2592 Added api and front_end as Modules 2011-02-13 01:58:56 +01:00
Ruud 09135e1738 Save all settings at once.
Removed log dir
2011-02-12 23:25:42 +01:00
Ruud e1d6701722 Tracebacks to file
Global settings
2011-02-12 22:05:06 +01:00
Ruud 722731c8bc Restructuring
Logging
Basic config loading from plugins/providers
2011-02-12 20:34:15 +01:00
Ruud fa50cd0353 Server start 2011-02-08 20:52:40 +01:00
Ruud c8ba3ceb72 Dependencies update 2011-02-08 20:34:18 +01:00
alshain 6ef510457a Adds traceback if wrapper fails. 2011-02-08 00:26:09 +01:00
alshain 079d65ec59 Also adds src path when running from script. 2011-02-07 23:40:02 +01:00
alshain 34486e06a5 Updates CouchPotato wrapper code. 2011-02-07 23:34:25 +01:00
alshain be45cc4637 Adds CouchPotato.py wrapping cli. 2011-02-07 23:03:32 +01:00