-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from cgDeepLearn/develop
mgr-worker
- Loading branch information
Showing
30 changed files
with
1,034 additions
and
125 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ WORKDIR /usr/app/smgr | |
|
||
ENV TZ=Asia/Shanghai | ||
|
||
ENV MGR_PORT=30002 | ||
ENV MGR_PORT=40002 | ||
|
||
EXPOSE $MGR_PORT | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--update_time_func trigger | ||
DROP FUNCTION IF EXISTS "public"."update_time_func"(); | ||
CREATE OR REPLACE FUNCTION "public"."update_time_func"() | ||
RETURNS "pg_catalog"."trigger" AS $BODY$ | ||
begin | ||
new.update_time = current_timestamp; | ||
return new; | ||
end | ||
$BODY$ | ||
LANGUAGE plpgsql VOLATILE | ||
COST 100; | ||
|
||
----------- | ||
--- Table structure for t_task | ||
------ ----- | ||
DROP TABLE IF EXISTS "t_task"; | ||
CREATE TABLE "t_task" ( | ||
"id" SERIAL NOT NULL PRIMARY KEY, | ||
"name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, | ||
"is_delete" bool NOT NULL DEFAULT false, | ||
"create_by" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, | ||
"create_time" timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"update_by" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, | ||
"update_time" timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
) | ||
; | ||
-- ---------------------------- | ||
-- Triggers structure for table t_task | ||
-- ---------------------------- | ||
CREATE TRIGGER "t_task_update" BEFORE UPDATE ON "t_task" | ||
FOR EACH ROW | ||
EXECUTE PROCEDURE "update_time_func"(); | ||
|
||
|
||
----------- | ||
--- Table structure for t_task_detail | ||
------ ----- | ||
DROP TABLE IF EXISTS "t_task_detail"; | ||
CREATE TABLE "t_task_detail" ( | ||
"id" SERIAL NOT NULL PRIMARY KEY, | ||
"task_id" INTEGER NOT NULL, | ||
"sub_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, | ||
"trigger" json NOT NULL default '{}', | ||
"action" json NOT NULL default '{}', | ||
"is_delete" bool NOT NULL DEFAULT false, | ||
"create_time" timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"update_time" timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
) | ||
; | ||
-- ---------------------------- | ||
-- Triggers structure for table t_task_detail | ||
-- ---------------------------- | ||
CREATE TRIGGER "t_task_detail_update" BEFORE UPDATE ON "t_task_detail" | ||
FOR EACH ROW | ||
EXECUTE PROCEDURE "update_time_func"(); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
|
||
[Log:Setup] | ||
# LOG_PATH = /var/log/sbackend/ | ||
LOG_PATH = ./ | ||
LOG_PATH = /var/log/sbackend/ | ||
;LOG_PATH = ./ | ||
MAX_SIZE = 5242880 | ||
BACKUP_COUNT = 10 | ||
LOG_FILENAME = sbackend | ||
|
||
[Database:Setup] | ||
POSTGRES_DATABASE = db_task | ||
POSTGRES_USERNAME = postgres | ||
POSTGRES_PASSWORD = postgres | ||
POSTGRES_USER = postgres | ||
;POSTGRES_PASSWORD = acb153 | ||
;POSTGRES_HOST = 172.24.4.56 | ||
;POSTGRES_PORT = 45432 | ||
POSTGRES_PASSWORD = acb153 | ||
POSTGRES_HOST = spostgres | ||
POSTGRES_PORT = 5432 | ||
|
||
[Flask:Setup] | ||
FLASK_PORT = 30001 | ||
FLASK_PORT = 40001 | ||
FLASK_IP = 0.0.0.0 | ||
FLASK_DEBUG = 0 | ||
|
||
[Redis:Setup] | ||
;REDIS_HOST = s-redis | ||
REDIS_HOST = localhost | ||
REDIS_HOST = sredis | ||
;REDIS_HOST = localhost | ||
REDIS_PORT = 6379 | ||
REDIS_PWD = 12345 | ||
REDIS_DB = 12 | ||
|
||
[Services:Setup] | ||
BACKEND_HOST = sbackend | ||
MGR_HOST = smgr | ||
MGR_PORT = 40002 | ||
WORKER_HOST = sworker |
This file contains 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
Oops, something went wrong.