From 80caa4ee9c183cba6471b1084f94815d06c01ac9 Mon Sep 17 00:00:00 2001 From: Manuel83 Date: Thu, 1 Nov 2018 21:27:37 +0100 Subject: [PATCH] config added --- .idea/workspace.xml | 250 ++++++++---------- core/api/__pycache__/actor.cpython-36.pyc | Bin 0 -> 941 bytes core/api/__pycache__/extension.cpython-36.pyc | Bin 0 -> 811 bytes core/api/actor.py | 2 +- core/api/extension.py | 5 +- .../dummy/__pycache__/__init__.cpython-36.pyc | Bin 1881 -> 1885 bytes .../__pycache__/jsondump.cpython-36.pyc | Bin 857 -> 0 bytes core/helper/__pycache__/utils.cpython-36.pyc | Bin 329 -> 0 bytes core/helper/utils.py | 8 - .../__pycache__/http_api.cpython-36.pyc | Bin 1519 -> 1516 bytes core/http_endpoints/http_api.py | 2 +- core/http_endpoints/http_login.py | 2 +- core/{helper => utils}/__init__.py | 0 .../__pycache__/__init__.cpython-36.pyc | Bin core/utils/__pycache__/utils.cpython-36.pyc | Bin 0 -> 1039 bytes core/{helper/jsondump.py => utils/utils.py} | 12 +- logs/first_logfile2.log | 27 +- logs/first_logfile2.log.2018-11-01_21-20 | 60 ----- logs/first_logfile2.log.2018-11-01_21-25 | 60 +++++ 19 files changed, 206 insertions(+), 222 deletions(-) create mode 100644 core/api/__pycache__/actor.cpython-36.pyc create mode 100644 core/api/__pycache__/extension.cpython-36.pyc delete mode 100644 core/helper/__pycache__/jsondump.cpython-36.pyc delete mode 100644 core/helper/__pycache__/utils.cpython-36.pyc delete mode 100644 core/helper/utils.py rename core/{helper => utils}/__init__.py (100%) rename core/{helper => utils}/__pycache__/__init__.cpython-36.pyc (100%) create mode 100644 core/utils/__pycache__/utils.cpython-36.pyc rename core/{helper/jsondump.py => utils/utils.py} (72%) delete mode 100644 logs/first_logfile2.log.2018-11-01_21-20 create mode 100644 logs/first_logfile2.log.2018-11-01_21-25 diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 11c41a2..8c52696 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,35 +2,15 @@ - - - - - - - - - - - - + + + + - - - - - - - - + - - - - - - + @@ -378,29 +359,7 @@ \ No newline at end of file diff --git a/core/api/__pycache__/actor.cpython-36.pyc b/core/api/__pycache__/actor.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..723db332081c4a75d8c28a110bb42ee4a967960a GIT binary patch literal 941 zcmbtS&5qMB5VoD4rrnlhR~&hPN+>zN38B@(3UNUd65 z=E#Xx;KYne*@EDNrTNi}=bO(nez;i7?pI&lYD&mga&Ths&q3T7C_x0(q(sX!-LjHV z^dlW@<1(Q{l6R?`T+=dpK}0N)8zK_PuA_1)=xee}zX1kWEva8zJbR^{e;8!vl<6RF zq)jDwZMsIaHQw4E2F^K%djLw3k_u8XK?S=ZWh5dIgN05a1)GS8$iSvz3f*RYid~-8 zgRwQj;6aOW0pjk067&<{I}OlK##SDbXG-|EtF{vS*h$^^xL)__GqE$M`u@0hjO(JdRWq!mw7q&%)W*u9>Qzx8k-Y!tGtO0~2F?-5;eZKE>DB2k zw)y_TZ?s`EJK9(gsM1v+vt%}dkWYGZDQyVt)DcFR>F$7aVFL7Oe%r-#HDcmH`)_<2 z@c#skOw*h|-5xpYG)y~(%zr^AZm0%%?*RPxmUhUkmJ^&KE{JnK<9utxsL`Ku{(h|V zE@S6_Ve$R;7!_{(;2pRCi&L^VQyij0m9Z?&qAUtg_(v0M+E#UKd5X)-VVSwy|6Pl7 z^(P^*k-C>Q9|xtKjW8bLxAxOk4le;hTIAfQz%xZqSQmEw8zrAT*}druJN)D|r*k@E FKLAX-$4>wN literal 0 HcmV?d00001 diff --git a/core/api/__pycache__/extension.cpython-36.pyc b/core/api/__pycache__/extension.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff1f04a42c491e1f72e5df6f45e710475adcb067 GIT binary patch literal 811 zcmY*X!H&}~5Vf78P2056B81pmCB&hZ<^V^uT2WYpgbETuf^e|h*i9X|N!NCPR?De- z<-}L;8+?X2a^e>_F-};iYiq{i8GGivu^$bG{qOA8$DbIX-{@!rV4s7SIVg@eRw!#% zoZ)6qG6E}6!8*($j07q>qIE=|`bIwgVnt0B*dT7!X^K{47YX9JZNyW#u9(y|DHZ;C{Xfkl5HZI&SyK-GFb;Z`g1!iYlcU|+X z62|o?%@s3-QrD-n^@1H!x|B+Q75e6QVOaoL8eXv&u`>JV;_Q>_fI|mD9WIk(tmMO|3uC$tennH0ht^3&1M4tai|EN delta 23 fcmcc1cax9Pn3tC;EdF*h`$WzyjI0|E&1M4tS33ud diff --git a/core/helper/__pycache__/jsondump.cpython-36.pyc b/core/helper/__pycache__/jsondump.cpython-36.pyc deleted file mode 100644 index 573acf481da0e2772b153e65a9fbb12e2bf32224..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 857 zcmZ8f&2G~`5T02(i7_oi1&X*KZob4wAWjGs+6oDYa44w7NLbG9mLy%e$M@3Y}MU3zgRIGYupn4ilqoSw!YH$WcU*R5P$vIVlafadgtGzel-A1-b+f0PP z&WqOsO-P?h-`WmKj{SS6uZuoz6VOngfwkS&^(C2_l{C~fbdlyob>nM zJX>GpXcJ)(`2-%^K&cMrzBggrqFhO!~64%x)M=D_41M!?m}^ z3%zS?YqKcCPMgCJwUc>3{R8X`3jMv6zjNBUysnxhx$Vq5In6)K{B$|VrL7MAL~Fa4 zJ|u^8@U-afv?L;y{+vh}$NcbAp~rK%u1bb>jZ*%5Fr*w;c47C(-MtHF?-I@i_6}!o yE8!M1Hd2+ZCY948noFB*UEPwp7rLY?^|?dKQ-$Q|1rN`70>|7YxF&|taN`db#=wLRBETPv+yVQOJ-zZ zVrSyq0ddlMezJAX_wH;w9(~V0=5GM-N%$*9>YCstL<$rd$U!lcyg-f$?;+z~^a9fY z<3W`W4hS~{cS7W0O?_MTdb~l8&uoob+^`wB-NGF_!kUo_o94{=ED5~pbsP9fHYRY> zNkw;iWh)yUunb&DFWkt6?DuD@(u7+V=IiC_1Y} zrA@D`7<_HqX}=1G(fz6D+Ol5qIP5+V;1N!k9g)hIjahbj_u)T^0YiGxbZRjADn@s4 HQ)%)GRBTJ3 diff --git a/core/helper/utils.py b/core/helper/utils.py deleted file mode 100644 index eb0bc36..0000000 --- a/core/helper/utils.py +++ /dev/null @@ -1,8 +0,0 @@ -import yaml - - -def load_config(fname): - with open(fname, 'rt') as f: - data = yaml.load(f) - # TODO: add config validation - return data \ No newline at end of file diff --git a/core/http_endpoints/__pycache__/http_api.cpython-36.pyc b/core/http_endpoints/__pycache__/http_api.cpython-36.pyc index 58170c2bb89f685d47ec5fc5bcadcddeaef1eb2e..c99cfadf91204f5fafeded2e5bb1583bf43417e2 100644 GIT binary patch delta 57 zcmaFQ{f3*Y{PRL_@;Diy9&jP4ou>_E{(VjkmIX z2i)58{g?f{A}xi~9qt-WpS(a-x$tpnOI_(H&|zF2N)u%l#oWTpvN=|^;NRM(U}4PX zuz*v3fVI75Z`dK5bIis25!bfkIlr99!uhi#SI$>uBG6YG7D+B044p3$n|x<_4e$N) zp!d#5ZF+f9Or;v?%$ju6JId^6I_RZ38QOuAdXnAkrKOg=kyI0@dsCY!)1A!R8r>eJ zWiiZ-s9;majX?{xxn4&tCG+1x@=Ma&s7MxpU`Q1NM_Qinumj(1?3VdN$w=->&w+^P+sF!S@*S|^hRfEEvU J+Y1`)t-nZ_=SKhl literal 0 HcmV?d00001 diff --git a/core/helper/jsondump.py b/core/utils/utils.py similarity index 72% rename from core/helper/jsondump.py rename to core/utils/utils.py index 762524d..d7d05a5 100644 --- a/core/helper/jsondump.py +++ b/core/utils/utils.py @@ -1,9 +1,18 @@ import json from json import JSONEncoder +import yaml + from core.database.model import DBModel, ActorModel +def load_config(fname): + with open(fname, 'rt') as f: + data = yaml.load(f) + # TODO: add config validation + return data + + class ComplexEncoder(JSONEncoder): def default(self, obj): @@ -22,5 +31,6 @@ class ComplexEncoder(JSONEncoder): pass return None + def json_dumps(obj): - return json.dumps(obj, cls=ComplexEncoder) \ No newline at end of file + return json.dumps(obj, cls=ComplexEncoder) diff --git a/logs/first_logfile2.log b/logs/first_logfile2.log index c4032f1..ed8f241 100644 --- a/logs/first_logfile2.log +++ b/logs/first_logfile2.log @@ -1,15 +1,12 @@ -2018-11-01 21:25:19,670,1,WOOHO -2018-11-01 21:25:20,673,1,WOOHO -2018-11-01 21:25:21,677,1,WOOHO -2018-11-01 21:25:22,682,1,WOOHO -2018-11-01 21:25:23,686,1,WOOHO -2018-11-01 21:25:24,690,1,WOOHO -2018-11-01 21:25:25,693,1,WOOHO -2018-11-01 21:25:26,698,1,WOOHO -2018-11-01 21:25:27,702,1,WOOHO -2018-11-01 21:25:28,707,1,WOOHO -2018-11-01 21:25:29,710,1,WOOHO -2018-11-01 21:25:30,713,1,WOOHO -2018-11-01 21:25:31,715,1,WOOHO -2018-11-01 21:25:32,719,1,WOOHO -2018-11-01 21:25:33,723,1,WOOHO +2018-11-01 21:26:19,915,1,WOOHO +2018-11-01 21:26:20,922,1,WOOHO +2018-11-01 21:26:21,928,1,WOOHO +2018-11-01 21:26:22,933,1,WOOHO +2018-11-01 21:26:23,938,1,WOOHO +2018-11-01 21:26:24,944,1,WOOHO +2018-11-01 21:26:25,946,1,WOOHO +2018-11-01 21:26:26,950,1,WOOHO +2018-11-01 21:26:27,954,1,WOOHO +2018-11-01 21:26:28,958,1,WOOHO +2018-11-01 21:26:29,962,1,WOOHO +2018-11-01 21:26:30,966,1,WOOHO diff --git a/logs/first_logfile2.log.2018-11-01_21-20 b/logs/first_logfile2.log.2018-11-01_21-20 deleted file mode 100644 index cd16989..0000000 --- a/logs/first_logfile2.log.2018-11-01_21-20 +++ /dev/null @@ -1,60 +0,0 @@ -2018-11-01 21:20:19,492,1,WOOHO -2018-11-01 21:20:20,498,1,WOOHO -2018-11-01 21:20:21,501,1,WOOHO -2018-11-01 21:20:22,505,1,WOOHO -2018-11-01 21:20:23,507,1,WOOHO -2018-11-01 21:20:24,511,1,WOOHO -2018-11-01 21:20:25,512,1,WOOHO -2018-11-01 21:20:26,514,1,WOOHO -2018-11-01 21:20:27,516,1,WOOHO -2018-11-01 21:20:28,521,1,WOOHO -2018-11-01 21:20:29,526,1,WOOHO -2018-11-01 21:20:30,530,1,WOOHO -2018-11-01 21:20:31,533,1,WOOHO -2018-11-01 21:20:32,534,1,WOOHO -2018-11-01 21:20:33,539,1,WOOHO -2018-11-01 21:20:34,542,1,WOOHO -2018-11-01 21:20:35,547,1,WOOHO -2018-11-01 21:20:36,548,1,WOOHO -2018-11-01 21:20:37,553,1,WOOHO -2018-11-01 21:20:38,556,1,WOOHO -2018-11-01 21:20:39,563,1,WOOHO -2018-11-01 21:20:40,568,1,WOOHO -2018-11-01 21:20:41,572,1,WOOHO -2018-11-01 21:20:42,574,1,WOOHO -2018-11-01 21:20:43,576,1,WOOHO -2018-11-01 21:20:44,581,1,WOOHO -2018-11-01 21:20:45,585,1,WOOHO -2018-11-01 21:20:46,588,1,WOOHO -2018-11-01 21:20:47,593,1,WOOHO -2018-11-01 21:20:48,599,1,WOOHO -2018-11-01 21:20:49,602,1,WOOHO -2018-11-01 21:20:50,603,1,WOOHO -2018-11-01 21:20:51,604,1,WOOHO -2018-11-01 21:20:52,608,1,WOOHO -2018-11-01 21:20:53,612,1,WOOHO -2018-11-01 21:20:54,616,1,WOOHO -2018-11-01 21:20:55,621,1,WOOHO -2018-11-01 21:20:56,625,1,WOOHO -2018-11-01 21:20:57,626,1,WOOHO -2018-11-01 21:20:58,631,1,WOOHO -2018-11-01 21:20:59,635,1,WOOHO -2018-11-01 21:21:00,637,1,WOOHO -2018-11-01 21:21:01,639,1,WOOHO -2018-11-01 21:21:02,643,1,WOOHO -2018-11-01 21:21:03,648,1,WOOHO -2018-11-01 21:21:04,653,1,WOOHO -2018-11-01 21:21:05,657,1,WOOHO -2018-11-01 21:21:06,662,1,WOOHO -2018-11-01 21:21:07,666,1,WOOHO -2018-11-01 21:21:08,671,1,WOOHO -2018-11-01 21:21:09,676,1,WOOHO -2018-11-01 21:21:10,682,1,WOOHO -2018-11-01 21:21:11,684,1,WOOHO -2018-11-01 21:21:12,685,1,WOOHO -2018-11-01 21:21:13,690,1,WOOHO -2018-11-01 21:21:14,695,1,WOOHO -2018-11-01 21:21:15,700,1,WOOHO -2018-11-01 21:21:16,702,1,WOOHO -2018-11-01 21:21:17,707,1,WOOHO -2018-11-01 21:21:18,712,1,WOOHO diff --git a/logs/first_logfile2.log.2018-11-01_21-25 b/logs/first_logfile2.log.2018-11-01_21-25 new file mode 100644 index 0000000..eae4689 --- /dev/null +++ b/logs/first_logfile2.log.2018-11-01_21-25 @@ -0,0 +1,60 @@ +2018-11-01 21:25:19,670,1,WOOHO +2018-11-01 21:25:20,673,1,WOOHO +2018-11-01 21:25:21,677,1,WOOHO +2018-11-01 21:25:22,682,1,WOOHO +2018-11-01 21:25:23,686,1,WOOHO +2018-11-01 21:25:24,690,1,WOOHO +2018-11-01 21:25:25,693,1,WOOHO +2018-11-01 21:25:26,698,1,WOOHO +2018-11-01 21:25:27,702,1,WOOHO +2018-11-01 21:25:28,707,1,WOOHO +2018-11-01 21:25:29,710,1,WOOHO +2018-11-01 21:25:30,713,1,WOOHO +2018-11-01 21:25:31,715,1,WOOHO +2018-11-01 21:25:32,719,1,WOOHO +2018-11-01 21:25:33,723,1,WOOHO +2018-11-01 21:25:34,725,1,WOOHO +2018-11-01 21:25:35,729,1,WOOHO +2018-11-01 21:25:36,733,1,WOOHO +2018-11-01 21:25:37,737,1,WOOHO +2018-11-01 21:25:38,742,1,WOOHO +2018-11-01 21:25:39,750,1,WOOHO +2018-11-01 21:25:40,756,1,WOOHO +2018-11-01 21:25:41,759,1,WOOHO +2018-11-01 21:25:42,764,1,WOOHO +2018-11-01 21:25:43,767,1,WOOHO +2018-11-01 21:25:44,773,1,WOOHO +2018-11-01 21:25:45,775,1,WOOHO +2018-11-01 21:25:46,780,1,WOOHO +2018-11-01 21:25:47,786,1,WOOHO +2018-11-01 21:25:48,788,1,WOOHO +2018-11-01 21:25:49,792,1,WOOHO +2018-11-01 21:25:50,796,1,WOOHO +2018-11-01 21:25:51,802,1,WOOHO +2018-11-01 21:25:52,805,1,WOOHO +2018-11-01 21:25:53,809,1,WOOHO +2018-11-01 21:25:54,811,1,WOOHO +2018-11-01 21:25:55,816,1,WOOHO +2018-11-01 21:25:56,818,1,WOOHO +2018-11-01 21:25:57,823,1,WOOHO +2018-11-01 21:25:58,827,1,WOOHO +2018-11-01 21:25:59,831,1,WOOHO +2018-11-01 21:26:00,835,1,WOOHO +2018-11-01 21:26:01,840,1,WOOHO +2018-11-01 21:26:02,843,1,WOOHO +2018-11-01 21:26:03,846,1,WOOHO +2018-11-01 21:26:04,852,1,WOOHO +2018-11-01 21:26:05,856,1,WOOHO +2018-11-01 21:26:06,860,1,WOOHO +2018-11-01 21:26:07,865,1,WOOHO +2018-11-01 21:26:08,870,1,WOOHO +2018-11-01 21:26:09,878,1,WOOHO +2018-11-01 21:26:10,883,1,WOOHO +2018-11-01 21:26:11,885,1,WOOHO +2018-11-01 21:26:12,889,1,WOOHO +2018-11-01 21:26:13,891,1,WOOHO +2018-11-01 21:26:14,892,1,WOOHO +2018-11-01 21:26:15,898,1,WOOHO +2018-11-01 21:26:16,903,1,WOOHO +2018-11-01 21:26:17,908,1,WOOHO +2018-11-01 21:26:18,911,1,WOOHO