- Possibility to requeue messages that result in specific exceptions.
Exceptions that will nack the message (for AMQP transport) is called
AmqpInternalServiceError
. Exceptions that won't delete the message from the queue and in turn will result in it to "reappear" unless configured non-default (for AWS SNS+SQS transport) is calledAWSSNSSQSInternalServiceError
.
- Corrected an issue regarding crontab notation for scheduling function calls where it didn't parse the upcoming date correctly if both isoweekday and day part were given.
- Catches unintended HTTP exceptions and prints a useful stacktrace if log_level is set to DEBUG.
- Fixes an issue where Content-Type header couldn't be specified without charset in HTTP transports.
- Cleared some old debug code.
- Corrects and issue with AMQP transport which caused invoked functions to not be able to declare scope variables without crashes.
- Release fixes a major issue which caused invoked functions to not be able to declare any scope variables.
@http_static
decorator for serving static files from a folder on disk. Takes to values; 1. the path to the folder, either relative to the service file or absolute; 2. the base URL path for static files as a regexp.
- Changed format of access log for HTTP requests - now logging user agent and login name (if authorization via Basic Auth).
- Support for
X-Forwarded-For
headers viareal_ip_from
andreal_ip_header
options which will log the forwarded IP instead of the one from the load balancer / proxy. - Access log for HTTP can now be specified as a filename to which the service will log all requests.
- Fixes issue with schedule invoker which would crash if invoked at second 0.
- Updated dependencies to latest available versions.
- Timezone support for
schedule
invoker functions. - Added more decorator invoker functions as aliases for common scheduler
use cases -
@minutely
,@hourly
,@daily
and@heartbeat
(every second) - Updated example services and better test cases.
- Updated aiohttp / aiobotocore / botocore dependencies.
- Solved issues with aiobotocore / aiohttp dependencies.
- Refactored loader functions.
- Corrected issue with configuration values for AWS and AWS SNS+SQS settings.
- Improved testing suite and more code coverage for integration tests.
- New "transport" invoker for service functions:
schedule
. It works like cron type scheduling where specific functions will be run on the specified interval. For example a function can be specified to run once per day at a specific time or every second minute, or the last Tuesday of January and March at 05:30 AM. - Values for keyword arguments invoked by transport decorators were earlier
always set to
None
, despite having other default values. This is now corrected.
- Type hinted examples and test cases.
- Shielded function calls for AMQP and SNS+SQS transports to avoid unexpected execution stop.
- Added version output to tomodachi CLI tool.
- Additional test cases.
- Type hinted code base and minor bug fixes for internal functions.
- Invoker methods can now be called directly without the need to mock the invoker decorator function.
- Added
@functools.wraps
decorator to invoked functions of service classes.
- Added a list of safe modules that may never be removed from the list of already loaded modules. Removing the module 'typing' from the list would cause a RecursionError exception since Python 3.6.1.
- Additional improvements to network connectivity issues to not get stuck in waiting state.
- Improved SNS+SQS draining / restart when network connectivity has been lost or temporarily suspended. Would improve situations when development machine has been in hibernation.
- Replaced deprecated logging functions to rid warnings.
- Support for a "generic" aws dictonary in options that can hold region, access key id and secret to be shared among other AWS resources/services.
- Updated aiobotocore / botocore dependencies.
- Gracefully handle and discard invalid SNS/SQS messages not in JSON format.
- Corrected issue where watched directories with "similar" names as settings would be ignored.
- Updated issues with function caching due to keepalive when hot reloading in development. Currently disables keepalive entirely.
- Fixed issue with updated file logging for watcher.
- Downgraded botocore to meet requirements and to make the installed
tomodachi
script runnable again.
- Watcher is now configurable to ignore specific directories dependant on the service. (github: smaaland)
- Fixed issue where using
--config
instead of-c
would result in a raised exception. (github: smaaland)
tomodachi.transport.http
has its own Response object that works better with default content types and charsets - examples/http_service.py updated.- No automatic conversion will be tried if the returned response of an http
method is of
bytes
type.
- Improved handling of how charsets and encodings work with aiohttp.
- Fixed an issue where
Content-Type
header would always be included twice for aiohttp.web.Response objects.
- Watcher now only reacts to files with file endings
.py
,.json
,.yml
,.html
or.html
and ignores to look at paths__pycache__
,.git
,.svn
,__ignored__
,__temporary__
and__tmp__
. - HTTP transport may now respond with an aiohttp.web.Response object for more complex responses.
- HTTP transport response headers can now use the multidict library.
- Working PyPI release.
- Added unit tests.
- Works with aiohttp 2 and aiobotocore 0.3.
- Service classes must be decorated with
@tomodachi.service
.