Add web process

This commit is contained in:
Jake Howard 2019-02-14 14:27:04 +00:00
parent bc84c3f324
commit be5d356059
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 130 additions and 4 deletions

View file

@ -12,9 +12,12 @@ isort = "*"
python_version = "3.5"
[scripts]
start = "python3 actioner/main.py"
start = "python3 -m actioner"
test-fix = "bash ./scripts/test-fix.sh"
test = "bash ./scripts/test.sh"
[pipenv]
allow_prereleases = true
[packages]
aiohttp = "*"

108
Pipfile.lock generated
View file

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "507909fb4e8b6abaf2381ce82b2bc5fe8b2bf199c8bbffb5a627458384f4dde6"
"sha256": "0f025f2c0a2195605a3e25cef24d83f6c34c4a197230efdfef49d2716dd36caa"
},
"pipfile-spec": 6,
"requires": {
@ -15,7 +15,111 @@
}
]
},
"default": {},
"default": {
"aiohttp": {
"hashes": [
"sha256:0c5a7b270b7d1437eb21ad11dbd97365ec063ffca9beba3a519067f686f7a0a8",
"sha256:0d4cadba74fed3ef448d34f9ea285ea862ff36ff59b68c18b21ecdcdf0a63397",
"sha256:0ee048a1b452dba7f0547765501de1f5db80c9494c46c009e6138ef11755bd6a",
"sha256:120f32516db19cc2e30920c54cb769f27b000390f74831f154573776677a41e8",
"sha256:21d8de1451fbff4f84780566012026707073fcf15f646b7aab33a56ae27392f9",
"sha256:450029dc3d3134152a17ea56926e1adb1ef29b6ad8f9dbfb75f7c6c1d6311e9f",
"sha256:4eff34add9668875afb43f69df04364f5aac661abe485e60010e9beebb6f4784",
"sha256:84aa603a85f928d7aa7f02ad0e2c1fe0c8d95816e54c6f6549fad75027a6001b",
"sha256:b5a1b78d9a419c819e2d8a3750db1f25e470a062a2fb6d315df0163f775a7381",
"sha256:d091799fcf01420049db1584d9d586c48f2d50a830ed384a3cce2bd11936b310",
"sha256:ec420a3143a6dad8dd383510b6d47ef96910574e2795c866e9225841cd4585d5"
],
"index": "pypi",
"version": "==3.0.0b0"
},
"async-timeout": {
"hashes": [
"sha256:00cff4d2dce744607335cba84e9929c3165632da2d27970dbc55802a0c7873d0",
"sha256:9093db5b8ddbe4b8f6885d1a6e0ad84ae3155464cbf6877c387605244c285f3c"
],
"version": "==2.0.1"
},
"attrs": {
"hashes": [
"sha256:10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69",
"sha256:ca4be454458f9dec299268d472aaa5a11f67a4ff70093396e1ceae9c76cf4bbb"
],
"version": "==18.2.0"
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
],
"version": "==3.0.4"
},
"idna": {
"hashes": [
"sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
"sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
],
"version": "==2.8"
},
"idna-ssl": {
"hashes": [
"sha256:a933e3bb13da54383f9e8f35dc4f9cb9eb9b3b78c6b36f311254d6d0d92c6c7c"
],
"version": "==1.1.0"
},
"multidict": {
"hashes": [
"sha256:024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f",
"sha256:041e9442b11409be5e4fc8b6a97e4bcead758ab1e11768d1e69160bdde18acc3",
"sha256:045b4dd0e5f6121e6f314d81759abd2c257db4634260abcfe0d3f7083c4908ef",
"sha256:047c0a04e382ef8bd74b0de01407e8d8632d7d1b4db6f2561106af812a68741b",
"sha256:068167c2d7bbeebd359665ac4fff756be5ffac9cda02375b5c5a7c4777038e73",
"sha256:148ff60e0fffa2f5fad2eb25aae7bef23d8f3b8bdaf947a65cdbe84a978092bc",
"sha256:1d1c77013a259971a72ddaa83b9f42c80a93ff12df6a4723be99d858fa30bee3",
"sha256:1d48bc124a6b7a55006d97917f695effa9725d05abe8ee78fd60d6588b8344cd",
"sha256:31dfa2fc323097f8ad7acd41aa38d7c614dd1960ac6681745b6da124093dc351",
"sha256:34f82db7f80c49f38b032c5abb605c458bac997a6c3142e0d6c130be6fb2b941",
"sha256:3d5dd8e5998fb4ace04789d1d008e2bb532de501218519d70bb672c4c5a2fc5d",
"sha256:4a6ae52bd3ee41ee0f3acf4c60ceb3f44e0e3bc52ab7da1c2b2aa6703363a3d1",
"sha256:4b02a3b2a2f01d0490dd39321c74273fed0568568ea0e7ea23e02bd1fb10a10b",
"sha256:4b843f8e1dd6a3195679d9838eb4670222e8b8d01bc36c9894d6c3538316fa0a",
"sha256:5de53a28f40ef3c4fd57aeab6b590c2c663de87a5af76136ced519923d3efbb3",
"sha256:61b2b33ede821b94fa99ce0b09c9ece049c7067a33b279f343adfe35108a4ea7",
"sha256:6a3a9b0f45fd75dc05d8e93dc21b18fc1670135ec9544d1ad4acbcf6b86781d0",
"sha256:76ad8e4c69dadbb31bad17c16baee61c0d1a4a73bed2590b741b2e1a46d3edd0",
"sha256:7ba19b777dc00194d1b473180d4ca89a054dd18de27d0ee2e42a103ec9b7d014",
"sha256:7c1b7eab7a49aa96f3db1f716f0113a8a2e93c7375dd3d5d21c4941f1405c9c5",
"sha256:7fc0eee3046041387cbace9314926aa48b681202f8897f8bff3809967a049036",
"sha256:8ccd1c5fff1aa1427100ce188557fc31f1e0a383ad8ec42c559aabd4ff08802d",
"sha256:8e08dd76de80539d613654915a2f5196dbccc67448df291e69a88712ea21e24a",
"sha256:c18498c50c59263841862ea0501da9f2b3659c00db54abfbf823a80787fde8ce",
"sha256:c49db89d602c24928e68c0d510f4fcf8989d77defd01c973d6cbe27e684833b1",
"sha256:ce20044d0317649ddbb4e54dab3c1bcc7483c78c27d3f58ab3d0c7e6bc60d26a",
"sha256:d1071414dd06ca2eafa90c85a079169bfeb0e5f57fd0b45d44c092546fcd6fd9",
"sha256:d3be11ac43ab1a3e979dac80843b42226d5d3cccd3986f2e03152720a4297cd7",
"sha256:db603a1c235d110c860d5f39988ebc8218ee028f07a7cbc056ba6424372ca31b"
],
"version": "==4.5.2"
},
"yarl": {
"hashes": [
"sha256:3278209d78d534d59ee44f595e54ee4d3a164fa77319ffbd418b1978edf71748",
"sha256:32a52453fc20153e34d2cf99f1a2f4c3d144e320896f1f89b5ee89bb41e877be",
"sha256:48f3807855b69414a41e70908e502d6dbf563e3eca22f73d1344aad9270a4ff9",
"sha256:4c2d780cb0b669bf027da57a0834d4968ed55c89f1593cfd11be8108bff699e2",
"sha256:843c90c7a2756c033e9bb4464f789e21bc33f561c1e6c0ef7569f452b33a761a",
"sha256:8765ebd034d0dc812a311b31251dffb434c753fc7124487912a5bca7baeb5c9b",
"sha256:a2dda88459cfe50f4f6a225d2f51e3fffb0c3c18f4c3a3ac38d9dc054f8c37b0",
"sha256:ac574aa2c45185e038489ff8f3bebd9269dd8327e86c72d9a7f83a1d3ad9eec4",
"sha256:ce5963f2451661a435721d8907a824daea52aad6e3bee9b4104e75d19269cdae",
"sha256:ceae77215870ecaba555b2e74dd308de9abe6d44b0eecafae6ecef4a14e289f8",
"sha256:cec06d4272c2ced65308daf63360daeea5061c030fe28f75e499afd735cee860",
"sha256:ee506bc321b455b4a410724ec9c0ad4940932553523c6e7b69f0155269793734",
"sha256:fbbb10276d53629c0300cfd4a2092e3bbfa9a5aa95cd49808e01c59492052077"
],
"version": "==1.2.0"
}
},
"develop": {
"entrypoints": {
"hashes": [

0
actioner/__init__.py Normal file
View file

3
actioner/__main__.py Normal file
View file

@ -0,0 +1,3 @@
from .main import main
main()

View file

@ -1,5 +1,15 @@
from multiprocessing import Process
from aiohttp.web import run_app as run_web_app
from actioner.web import get_server
def main():
print("Main")
server = get_server()
web_process = Process(target=run_web_app, args=(server,))
web_process.start()
web_process.join()
if __name__ == '__main__':

6
actioner/web/__init__.py Normal file
View file

@ -0,0 +1,6 @@
from aiohttp import web
def get_server():
app = web.Application()
return app