engine = create_engine(engineUrl, convert_unicode=True, poolclass=NullPool)
def jsonExtract(item, key):
j = json.loads(item)
value = j.get(key)
return value
@sqlalchemy.event.listens_for(engine, "begin")
def do_begin(conn):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bryans-MacBook-Pro:web-migrate brthor$ dotnet run3 | |
info: Microsoft.Extensions.DependencyInjection.DataProtectionServices[0] | |
User profile is available. Using '/Users/brthor/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. | |
Hosting environment: Production | |
Content root path: /Users/brthor/code/web-migrate | |
Now listening on: http://localhost:5000 | |
Application started. Press Ctrl+C to shut down. | |
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] | |
Request starting HTTP/1.1 GET http://localhost:5000/ | |
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] |
When you publish a self-contained dotnet linux app for .net core 2.0, and run it on a brand new machine, you'll get this error:
Failed to load', error: libunwind.so.8: cannot open shared object file: No such file or directory
Failed to bind to CoreCLR at '/export/libcoreclr.so'
You can solve this by installing system packages, but for a truly self-contained publish, pull the missing libraries from the microsoft docker image, and into your app's output. You can put them in the publish directory and distribute them with your app.
I recently hit this problem, while using ansible to create docker networks:
- name: Construct Default docker networks
shell: "docker network create
-o com.docker.network.bridge.enable_icc=false
-o com.docker.network.bridge.name={{item.networkName}}
--subnet {{item.subnet}} {{item.networkName}}"
with_items: "{{ docker_networks }}"