summaryrefslogtreecommitdiff
path: root/python/skytools/scripting.py
AgeCommit message (Collapse)Author
2014-10-27moved log msg about script's normal shutdown from BaseScript to DataMaintainermartinko
I think this could be useful to others but it's got to move until a better solution is figured out.
2014-10-06skytools.scripting: minor touchmartinko
2014-07-31BaseScript: added log msg about script's normal shutdownmartinko
2014-04-09moved psycopg2 reference from scripting module to actual script using itmartinko
2014-04-09skytools.scripting: moved psycopg2 import where it belongsmartinko
2014-01-30skytools.scripting: allow to specify exception(s) to suppress for a grace periodmartinko
It is possible to provide a list of exception names, or reserved keyword “ALL”.
2014-01-28skytools.scripting: added options to lower log level for exceptionsmartinko
The idea is to suppress error level log messages for a grace period in order not to pollute logs with transient errors that nobody would act upon.
2014-01-28cleaned up, even more robust, added logging, feature inactive by defaultmartinko
2014-01-28made more robust, returns retry count and valid cursormartinko
2014-01-28another iteration from pastmartinko
2014-01-28simple retriable execute (for sql)martinko
the idea is that db calls occasionally break due to transient issues and we’d rather have the calls retried before raising exceptions etc
2013-04-24skytools.scripting: more safety in run_func_safely()martinko
Scenario resolved: startup() fails and some variables are never initialised. those are used in overridden send_stats() which is called from generic exception handler in run_func_safely(). thus a new exception is raised that would obscure the original exception raised in startup().
2013-03-22DBScript.add_connect_string_profile: single place for profile logicMarko Kreen
2013-03-22londiste: connection profilesMarko Kreen
Way to add extra connect string parameters for non-config connection strings (public node locations).
2013-03-04loop_delay: let class variable set defaultMarko Kreen
This way it's easier to change default in subclass.
2013-02-13noisemartinko
2013-01-14BaseScript: skylog_locations config optionsMarko Kreen
This allows to specify per-script skylog.ini
2013-01-10Fix basescript docstringMarko Kreen
2012-12-17Fix exception_hook rash on null query stringPetr Jelinek
2012-11-02Merge remote-tracking branch 'intgit/master'Marko Kreen
2012-11-02Londiste: try to show exact event info on failure.Marko Kreen
This should help debugging replication problems. It does not work on first error, as we batch together a lot of SQL statements, but on retry Londiste start replaying events one-by-one, the the exact event can be spotted. DBScript unnecessarily overrided emsg, drop that.
2012-10-19skytools.scripting: added start-up time attributemartinko
2012-10-19white noisemartinko
2012-10-16Allow overrided options with --set to show up in --ini outputMarko Kreen
2012-10-04skytools.scripting: speed up stat countersmartinko
2012-08-04skytools.scripting: log config reload, updated comment.martinko
2012-08-04skytools.scripting: added support for script __version__martinko
2012-08-03skytools.scripting: added shutdown() to BaseScriptmartinko
This should be used for cleanup code instead of abusing stop(), which is called from signal handler.
2012-06-15BaseScript: write pidfile atomically to avoid corrupt pidfiles.Marko Kreen
2012-06-15Move signal_pidfile to 'fileutil' moduleMarko Kreen
2012-05-25signal_pidfile: support sig=0 on win32Marko Kreen
To avoid pywin32 dependency for such basic functionality, use kernel32.dll via ctypes directly.
2012-05-25skytools.UsageError: remove noise wordMarko Kreen
2012-05-25CascadeAdmin: add node name prefix messages from dbMarko Kreen
2012-05-22skytools.scripting: catch EINTR from sleep()Marko Kreen
2012-05-22skytools.scripting: detect missing signalsMarko Kreen
Don't hook signals that are not supported by OS. Needed for win32.
2012-02-10basescript: exception_sleep param to configure sleep-on-exceptionMarko Kreen
2011-12-08skytools: seems psycopg2 isolation constants do changeMarko Kreen
Psycopg 2.4.2 moved them around. Stop hard-coding them, instead import from psycopg2.externsions Also have a symbol for repeatable read.
2011-12-07DBScript: simpler removal of password infoMarko Kreen
PG connect strings can be quite free-form. So remove everything after 'password'.
2011-12-07Merge remote branch 'martino/master'Marko Kreen
2011-12-07Merge branch 'master' of git://github.com/markokr/skytoolsMarko Kreen
2011-12-07skytools.signal_pidfile: ignore empty pidfile, some cleanupsMarko Kreen
Empty pidfile can happen if old process failed to write it for some reason.
2011-12-06Merge branch 'master' of skype-git:/git/dba/skytools-3martinko
2011-12-06filter potential passwords in connstr before logging itanti.veeranna
2011-12-05reworked custom logging initmartinko
SkyLogger is no more installed automatically on scripting.py loading, rather exlicitly when our custom getLogger() function is called.
2011-11-29skylog: record.name is not jobname anymoreMarko Kreen
2011-11-28skytools/scripting.py: added new log level TRACE that is below DEBUG levelmartinko
Added new "debug-2" log level that is intended for finer-grained informational events than DEBUG log level.
2011-11-24skytools.scripting: fix fileConfig on python 2.5Marko Kreen
There is no disable_existing_loggers argument so we need manually enable all loggers again.
2011-11-23skytools.BaseScript: fix use_skylog vs. module level loggers.Marko Kreen
We want to support loggers initialized on module import time, but for some reason logging.config.fileConfig() disables all existing loggers by default. Set disable_existing_loggers=False when calling to stop such behaviour.
2011-11-14skytools.scripting: datefmt support in loggingmartinko
2011-11-14skytools.BaseScript: .cf_defaults attributeMarko Kreen
This gives simple way to add defaults